Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony2: How to find the users that have permissions for a certain domain object?

In our application based on Symfony2 we would like to create a list of which of the users in the system that has permissions for a given domain object. We are using ACL and our immediate instinct was to look in the ACL-object returned from the ACLProvider of the domain object in question, for methods that could return the users (or at least SecurityIdentities) that has permissions, but I could not find such methods.

We are certain that this functionality is available through the API, but we cannot find where these methods are hidden.

EDIT An alternative would be to look up these connections in the acl-tables directly and finding out that way, but it would not be very pretty and we would probably be reinventing the wheel.

like image 624
Aleksander Krzywinski Avatar asked Jul 07 '11 12:07

Aleksander Krzywinski


1 Answers

By default, the Authorization are specified in the file app/config/security.yml. It describe if a Role is allowed or not to access some modules.

There are some differences between Authorization and Permissions.

Permission are not managed by default by Symfony but through specific development (or bundles...)

like image 143
Chopchop Avatar answered Oct 17 '22 00:10

Chopchop