F
Filamentβ€’13mo 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β€’13mo ago
What is the error when they cannot login? If you didn't assign any roles can the new user login?
shad
shadOPβ€’13mo 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β€’13mo 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β€’13mo ago
I didn't add this function to user model
Solution
Vp
Vpβ€’13mo 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β€’13mo ago
Just added it and it worked !! thank you so muchπŸ™
Vp
Vpβ€’13mo ago
oh.. great
toeknee
toekneeβ€’13mo ago
Glad you got it resolved. Please do try to read the documentation throughly in future, everyones time on discord is precious.
Want results from more Discord servers?
Add your server