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.
Three ways to authorize
- Optional Spatie
- Plugin callback
- Config callback
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”:Resolution order
- Guest → deny
permissions.enabled = false→ allow authenticated- Plugin / config
authorizecallback (non-null wins) - Optional Spatie/Gate name if that permission row exists
- Default allow — unless
strict
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.php → permissions.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.