Skip to main content

Authorize settings administration

The native settings page requires all three conditions: the current panel has FLEX Theme, that plugin allows its settings page, and Laravel’s manage-flex-theme gate allows the current user. The package does not automatically give every authenticated user this ability. Define the gate in your application’s service provider. Adapt the role/attribute check to your application:
The gate protects page access and save/upload/import/export/reset/font actions. Your native panel authentication, canAccessPanel() and resource policies still apply. Hiding a navigation item alone is not an authorization strategy.

Give different panels different themes

Create a separate plugin instance in each native panel provider. Stable native panel IDs identify saved preference rows and owned branding assets.
Admin retains an editable settings page except for its locked fields. Partner is fully PHP-configured and has no settings page. A save in Admin does not rewrite Partner’s preferences. Register each panel’s native theme CSS/Vite entry too. Do not reuse one mutable plugin instance across panel providers.

Permit administration only in selected panels

For a panel that should never expose the page, also use settingsPage(false). Ordinary panel users still see the saved design without needing this gate.
Use this pattern in custom navigation, dashboard links and user-menu entries. The package’s native page access check also applies to its search discovery. settingsPage(false) is a real feature switch; overriding only a menu item’s visibility is not an equivalent replacement.

Tenant and user scope

Theme Settings is panel-scoped, not tenant-scoped or user-scoped. In a multi-tenant panel, an authorized save affects the panel shared by those tenants. Restrict the gate to operators who should control that shared design. This is different from announcement cache/dismissal scope and recovery history, which include user/tenant context. Per-tenant branding/settings storage requires an application integration; it is not enabled by selecting a tenant or by importing preferences. Native remembered light/dark mode remains browser state, independently of the shared available-mode policy. Search access, resource policies, announcement-provider visibility and recovery permissions each retain their own checks.