Skip to main content
Flex Forms Studio ships with enterprise RBAC. Spatie Permission is optional — you never have to install it. Without it (or before you seed permission rows), authenticated panel users keep full Studio access, exactly as before. Every sensitive action is enforced on the server (Livewire, policies, export routes). The UI only hides buttons so teammates never see actions they cannot perform.

What you can gate

Permission names default to Filament Guardian style (Create:FlexForm, Export:FlexFormSubmission, …). Remap them in config if your Shield / custom roles use different strings.
Multi-admin hosts: Without Spatie permission rows or an authorize callback, every authenticated panel user keeps full Studio access on the server (BC default). The Studio UI fails closed for missing permission keys in the bootstrap payload. For teams with more than one admin, configure Spatie / Shield (or FilamentFlexFormsPlugin::authorizeAbilityUsing) and consider FLEX_FORMS_PERMISSIONS_STRICT=true so missing grants deny instead of allow.

Three ways to authorize

Install spatie/laravel-permission if you want it, seed the mapped permission names, and assign them to roles.Flex Forms only enforces a Spatie name after that permission exists in your database. Until you seed Flex Forms permissions, nothing locks out your team (safe rollout).

Strict mode (SaaS fail-closed)

When you need “deny unless explicitly allowed”:
Then every ability must pass your authorize callback or a registered Spatie/Gate permission. Missing both → deny. Turn the whole system off (every authenticated user allowed):

Resolution order

  1. Guest → deny
  2. permissions.enabled = false → allow authenticated
  3. Plugin / config authorize callback (non-null wins)
  4. Optional Spatie/Gate name if that permission row exists
  5. Default allow — unless strict
Bootstrap payloads include a full permissions map so Studio React can hide Create, Publish, Export, and rail items in one shot — with request-level memoization so checks stay cheap.

Transactions (Spatie / Shield names)

Seed those rows (or remap in config/filament-flex-forms.phppermissions.map) and assign them to roles. Until they exist in the DB, the optional Spatie path stays open (BC); with FLEX_FORMS_PERMISSIONS_STRICT=true missing grants deny.
Last modified on September 7, 2026