opscale-co/nova-authorization
A Laravel Nova package that adds authorization management to your admin panel, helping you organize roles and permissions and control access to Nova resources and tools. Lightweight and easy to integrate into existing Nova applications.
composer require opscale-co/nova-authorization. The package builds on spatie/laravel-permission and opscale-co/actions, so confirm your Nova major version and Spatie version are supported before pulling it in.php artisan vendor:publish for the nova-authorization provider tags, then php artisan migrate). If you already have Spatie’s roles/permissions tables, skip the duplicates rather than running them twice.config/nova-authorization.php (or the package README if the config filename differs) for guard, model, and UI options.editor), attach a handful of permissions, assign the role to a test user, then log in as that user in Nova to confirm both the UI and the underlying Gate/policy checks behave as expected. This validates install, guard configuration, and cache behavior in one pass.Permission::findOrCreate, Role::findOrCreate) and attach with syncPermissions. This keeps local, staging, and production identical and makes the Nova UI a management surface rather than the source of truth.web, nova, or a custom guard, set it once in config, and use the same guard everywhere (seeder, policies, middleware). Nova’s guard and Spatie’s guard_name must agree or checks fail silently.viewAny, create, update, delete). A common pattern is a policy method calling $user->hasPermissionTo('posts.update'), with a Gate::before shortcut for super admins.canSee/canRun methods. A user who can edit roles can effectively grant themselves anything.opscale-co/actions) for assigning permissions to roles or roles to users in batches. After the v1.2.2 dependency bump, smoke-test these actions once — the API surface is unchanged, but the transitive actions version moved to ^4.1.php artisan permission:cache-reset (or forget spatie.permission.cache). Bake this into deploy scripts.guard_name = web won’t apply when Nova checks the nova guard. Verify with $user->getAllPermissions() and inspect guard_name in the DB when a role “has” a permission but access is denied.opscale-co/actions to ^4.1). No app code changes are required. Run composer update opscale-co/actions (or a full update), then regression-test any Nova actions that assign roles or permissions.How can I help you explore Laravel packages today?