You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 18, 2023. It is now read-only.
There is an issue i missed when i proposed to upgrade laravel-permission to 2.4 : role and permissions are retrieved from database by name but using also guard name. (the logic is in the Spatie Role and Permission findByName methods).
Result is, for example, when using $user->hasRole('role-name'), it request from database by name or uuid, but not guard name : this is an issue when using multiple guards.
I don't know yet how to fix this. (we could add guard name in the where condition in traits, but i dunno if it is the best way as it may be problematic to maintain).
Maybe simply drop support for checking if a user has role or permission by uuid could be a solution for fix this issue ? In fact, is checking a role by uuid instead of name usefull ?
The text was updated successfully, but these errors were encountered:
@joselfonseca i think you can close this issue : it's been a long time and noone reported any issue (using multiple guard is not a common use case, and if required developper can modify the role uuid trait to his needs)
There is an issue i missed when i proposed to upgrade laravel-permission to 2.4 : role and permissions are retrieved from database by name but using also guard name. (the logic is in the Spatie Role and Permission findByName methods).
Result is, for example, when using
$user->hasRole('role-name')
, it request from database by name or uuid, but not guard name : this is an issue when using multiple guards.I don't know yet how to fix this. (we could add guard name in the where condition in traits, but i dunno if it is the best way as it may be problematic to maintain).
Maybe simply drop support for checking if a user has role or permission by uuid could be a solution for fix this issue ? In fact, is checking a role by uuid instead of name usefull ?
The text was updated successfully, but these errors were encountered: