Skip to content

Conversation

@arshaviras
Copy link
Contributor

Added authorize(bool | Closure) method to the plugin.

The new method allows to control who can access the "System Info" page.

Example usage with Spatie Laravel Permission or Filament Shield:

use Cmsmaxinc\FilamentSystemVersions\FilamentSystemVersionsPlugin;

FilamentSystemVersionsPlugin::make()
    ->authorize(fn () => auth()->user()?->hasRole('super_admin'));

This makes the page visible only for users who have the super_admin role.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant