Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide The Filament Shield #103

Closed
jcgmalave opened this issue Aug 10, 2022 · 3 comments
Closed

Hide The Filament Shield #103

jcgmalave opened this issue Aug 10, 2022 · 3 comments

Comments

@jcgmalave
Copy link

How can i Hide The Filament Shield according to the user role or permission?

@rushi7997
Copy link

Same

@rushi7997
Copy link

@jcgmalave I have solved it by adding this to AuthServiceProvider

    protected $policies = [
        // 'App\Models\Model' => 'App\Policies\ModelPolicy',
        'Spatie\Permission\Models\Role' => 'App\Policies\RolePolicy',
    ];

and also I changed this line in the config/filament-shield.php

    'register_role_policy' => [
        'enabled' => true,
    ],

and the it worked

@bezhanSalleh
Copy link
Owner

If you read the readme properly only setting it to true from config will suffice.

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

No branches or pull requests

3 participants