phpsa / filament-authentication

MIT License
106 stars 23 forks source link

Roles and Permission not work for defaults modules #33

Closed veddishant closed 7 months ago

veddishant commented 1 year ago

HI! i have fresh install of laravel, filament and filament-authentication package. First of thank you for this all-in-one package. But i found there is some issue. please look following :

i have 2 Roles : 1) Super Admin 2) Filament-User i have given full permission to Super Admin & Filament-User has not any permission even though Users, Roles & Permission. Show i am login with Filament-User Role's User, they can also access the default 2 resources (Users, Roles & Permission.) that user has only one role Filament-User.

ex 1) John User (Role: SuperAdmin - Full Permission All checked) 2) Wiliam User (Role Filament-User - Nothing Permission - Empty Permission List)

But login with Wiliam i am able to access all three modules. Please let me know this is bug or want to do extra configuration for this.

phpsa commented 1 year ago

HI,

did you configure the policies, permissions to access areas are base don the policy files for each resource model

ruswan commented 1 year ago

I encountered the same issue, where it was successfully addressed for users using UserPolicy, but roles and permissions still appear for regular users.

image

phpsa commented 11 months ago

you need to set a policy up for those two models aswell