Skip to content
This repository has been archived by the owner on Feb 18, 2023. It is now read-only.

Bug with HasRolesUuid and HasPermissionsUuid #35

Closed
kslimani opened this issue Sep 6, 2017 · 3 comments
Closed

Bug with HasRolesUuid and HasPermissionsUuid #35

kslimani opened this issue Sep 6, 2017 · 3 comments

Comments

@kslimani
Copy link
Contributor

kslimani commented Sep 6, 2017

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 ?

@joselfonseca
Copy link
Owner

@kslimani hey there! have you seen anything here? have you had any issues? Is this still an issue?

Just want to see if work needs to be done here or if I can close this.

Thanks!

@kslimani
Copy link
Contributor Author

kslimani commented Nov 6, 2019

@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)

@joselfonseca
Copy link
Owner

Nice, Thanks! @kslimani

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants