Replies: 1 comment
-
#1667 Maybe helps somebody |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello
Please I need help on this
I have an application that allow user to be in more than one school and have different role , that is
A Teacher in school A may have role teacher with permission to view result in school A
Also that same teacher can have role teacher with permission to view, edit and print result and also role Head of School with permission to approve result in school B
I have added school_id to the role migration and I have attached the necessary permission to each role
Also I extend the Spartie Role model and added this
To the model
If I login in with user in school A all the $user->can(‘permission.name‘) work perfectly but when I switch the School or log in with user that has role for school B the
$user->can(‘permission.name ‘) Will return false
I there anything I am not doing rightly pls help .
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions