Forced Dashboards & Widget Locking
Forced Dashboards & Widget Locking
Forced dashboards allow CoreAdmins to standardise what team members see by pushing a dashboard configuration to specific users or entire roles. Combined with widget locking, this ensures critical metrics remain visible and unmodified.
Accessing forced dashboard management
Navigate to Configuration > Dashboard > Forced Dashboards. This page is only available to users whose role appears in the roles_can_use_forced_dashboards setting (default: core_admin only). The ForcedDashboardService handles all assignment operations.
Creating a forced dashboard assignment
- Click New Assignment on the Forced Dashboards management page
- Select a source dashboard — the template that will be pushed to the target. This can be any existing dashboard you own
- Choose a target:
- Specific user — set target_user_id to push to one person
- Entire role — set target_role to push to everyone with that role
- Select the display mode (see below)
- Set priority — a number that controls ordering when multiple forced dashboards are assigned. Lower numbers appear first (default is 10)
- Optionally tick Lock all widgets to prevent users from modifying any widget on the forced dashboard
- Click Assign to create the assignment
Valid target roles
The following roles can be targeted: core_admin, core_manager, warehouse_staff, technician, freelancer, and viewer.
Display modes
Additive mode
The forced dashboard appears alongside the user’s personal dashboards. Users keep all their own dashboards and gain the forced one in addition. This is ideal for team-wide reporting dashboards that everyone should have access to.
Exclusive mode
All personal dashboards are hidden. The user only sees forced dashboards. The hasExclusiveForcedDashboard() method checks whether a user has any active exclusive assignment. This mode is suited for warehouse kiosks, shared screens, or roles that should see only a curated view.
Dashboard cloning
Forced dashboards are cloned per user, not shared references. The cloneDashboardForAssignment() method creates a full copy of the source dashboard and all its widgets for each target user. This means changes to the source after assignment do not automatically propagate — use the refresh feature to re-sync.
Cloned dashboards carry the following fields on the DashboardLayout model: is_forced (true), force_mode (additive or exclusive), forced_from_assignment_id, forced_by_user_id, and forced_at.
Assignment lifecycle
- Create — Assignment is created and dashboards are cloned for target users
- Active (is_active = true) — Forced dashboards are visible to target users
- Deactivate (is_active = false) — Dashboards remain but are hidden from users. Useful for temporary pauses
- Reactivate — Set is_active back to true to restore visibility
- Revoke — Permanently removes the assignment and all cloned dashboards via soft delete
Events dispatched
The system fires ForcedDashboardAssigned when a dashboard is pushed to a user and ForcedDashboardRevoked when an assignment is permanently removed.
Refreshing a forced dashboard
The refreshForcedDashboard() method re-syncs a forced dashboard from its source. It deletes existing widgets and re-clones them from the source dashboard. By default, widget lock states are preserved — pass preserveLocks: false to reset all locks during the refresh.
Widget locking
The WidgetLockingService allows CoreAdmins to lock individual widgets or all widgets on a forced dashboard. Locked widgets cannot be moved, resized, deleted, or reconfigured by non-admin users.
Locking operations
- Lock single widget — lockWidget() sets is_locked to true, records locked_by_user_id and locked_at
- Unlock single widget — unlockWidget() clears the lock fields. Only CoreAdmins can unlock
- Lock all widgets — lockAllWidgetsOnDashboard() locks every unlocked widget on the dashboard
- Unlock all widgets — unlockAllWidgetsOnDashboard() unlocks every locked widget on the dashboard
- Toggle lock — toggleWidgetLock() switches the lock state and returns the new status
Visual indicators
Locked widgets display a lock icon overlay. In edit mode, locked widgets appear with a subtle border to indicate they cannot be interacted with. The canUserModifyWidget() method returns false if the widget is locked and the user is not a CoreAdmin.
Events
The system fires WidgetLocked when a widget is locked and WidgetUnlocked when a widget is unlocked.
Tips
- Use exclusive mode for warehouse kiosks or shared reception screens where only a curated dashboard should be visible
- Use additive mode for company-wide reporting dashboards that supplement personal dashboards
- Lock critical widgets (revenue KPIs, overdue invoices) to prevent accidental removal by team members
- Use the refresh feature after updating the source dashboard to push changes to all assigned users
- Set lower priority numbers for the most important forced dashboards so they appear first in the list
Was this article helpful?