F
Filamentβ€’15mo ago
shad

Roles and permissions

I'm using the shield package for roles and permissions and I'm struggling with adding new roles when I add a new role and assign it to a user, the user can no longer log in. only the super admin and panel user can log in, I already asked in #shield but no one answered yet so I hope someone could help me here πŸ™
Solution:
Just check and everything is working fine tho.. don't know what should be the error, sorry. And please implement this https://filamentphp.com/docs/3.x/panels/users#authorizing-access-to-the-panel cause you'll need later
Jump to solution
8 Replies
Vp
Vpβ€’15mo ago
What is the error when they cannot login? If you didn't assign any roles can the new user login?
shad
shadOPβ€’15mo ago
I'm sure that the credentials are a match, cuz when I changed the role to panel user or super admin I can log in
No description
Vp
Vpβ€’15mo ago
Check canAccessPanel() inside your User model.. maybe you permitted base on roles Oh, just checking conversation from #shield if you extend user model then you need to provide new canAccessPanle() in new model
shad
shadOPβ€’15mo ago
I didn't add this function to user model
Solution
Vp
Vpβ€’15mo ago
Just check and everything is working fine tho.. don't know what should be the error, sorry. And please implement this https://filamentphp.com/docs/3.x/panels/users#authorizing-access-to-the-panel cause you'll need later
shad
shadOPβ€’15mo ago
Just added it and it worked !! thank you so muchπŸ™
Vp
Vpβ€’15mo ago
oh.. great
toeknee
toekneeβ€’15mo ago
Glad you got it resolved. Please do try to read the documentation throughly in future, everyones time on discord is precious.

Did you find this page helpful?