Returning all permissions on a caller
Opened this issue · 4 comments
Is there a way to return a list of all privileges and/or restrictions on a given caller?
I'd like to return a list of the logged in user's permissions so I can display/edit them in an admin panel, and I can't see a way to easily retrieve all permissions.
Thanks!
Hey @Mattnmoore, are the allowed
and denied
calls the one's you're looking for?
Almost, it looks like those methods require a specific resource/action. I was looking for something like $user->getPermissions()
and having that return an array containing all permissions for that user, if that makes sense.
I ended up writing a custom solution to accomplish what I'm looking for, I was just curious if there was something built in.
P.S. this is an awesome package, it's been my favorite ACL package so far. I'm using the Laravel driver as well, thanks for writing that, @driesvints!
Hmm, I see what you mean. I actually have found the need myself sometimes to retrieve the permissions directly so perhaps I should just make it public. I first want to see if I can't find another way to make this happen, though.
Need this too.