Sunday 15 July 2012

php - Making a list of Doctrine entities accessible to a specific user based on a custom Voter in Symfony2 -


Status: My application works with the principles for which the user may or may have access. Whether a particular user has access to a specific user for a specific unit, the custom voucher is determined by the object (the process of determining that access to the user is quite complicated).

Problem: I need to show the user a list of the principles that have access. This list should probably be endorsed.

Question: It is impossible to create a single DQL / SQL query due to the complexity of the decision whether a user has access to an entity (or at least extremely difficult). By creating this list, there is no better way to raise all the institutions from the database, look into them and inquire with security. Whether the indicator is the use of the unit or not (which access is given to connect each unit, unless I have created an array with enough entities to fill that page)? Can I in any way take account of the voter when I ask for the list of institutions?

That is what ACL is made for it.

Please read the chapter of the book.

More information can be given in the lower part of the article.

Now that you have established the ACL, you can use the potential solution from the post, or

You can also see in ACLHelper.

No comments:

Post a Comment