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:Jump to 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
8 Replies
What is the error when they cannot login? If you didn't assign any roles can the new user login?
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
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 modelI didn't add this function to user model
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
Just added it and it worked !! thank you so muchπ
oh.. great
Glad you got it resolved.
Please do try to read the documentation throughly in future, everyones time on discord is precious.