lock icon indicating copy to clipboard operation
lock copied to clipboard

Returning all permissions on a caller

Open Mattnmoore opened this issue 11 years ago • 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!

Mattnmoore avatar Feb 02 '15 02:02 Mattnmoore

Hey @Mattnmoore, are the allowed and denied calls the one's you're looking for?

driesvints avatar Feb 02 '15 11:02 driesvints

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!

Mattnmoore avatar Feb 03 '15 01:02 Mattnmoore

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.

driesvints avatar Feb 03 '15 22:02 driesvints

Need this too.

Zyles avatar Aug 28 '15 18:08 Zyles