Skip to content

make the advantage and disadvantage of the ACL more clear #2989

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

monbro
Copy link

@monbro monbro commented Sep 18, 2013

For me as a SF2 developer to handle data manipulation was pretty new to me. So I asked in the irc and searched the web and finally landed on this documentation page. So it looked like this is the way to go and it is a usual thing like using bundles in SF2. But it isnt, it is a far more complex permission handler which will work upfront and is not that much flexible.

I would highly recommend to add at least some notes, so that other developers getting a note on that and can maybe save some days of work as the opposite of me.

For me as a SF2 developer to handle data manipulation was pretty new to me. So I asked in the irc and searched the web and finally landed on this documentation page. So it looked like this is the way to go and it is a usual thing like using bundles in SF2. But it isnt, it is a far more complex permission handler which will work upfront and is not that much flexible.

I would highly recommend to add at least some notes, so that other developers getting a note on that and can maybe save some days of work as the opposite of me.
@@ -216,3 +216,16 @@ added above:
The user is now allowed to view, edit, delete, and un-delete objects.

.. _`MongoDBAclBundle`: https://github.com/IamPersistent/MongoDBAclBundle

Looking for alternatives
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatives

a classical and simple conditional permission check would fit for you.
Some do it with the existing voter structure as well, or custom build solutions.

.. _`Voters`: http://symfony.com/doc/current/cookbook/security/voters.html
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

links to other pages of the doc should not hardcode the url but use internal references instead (so that they link to the same version of the doc)

weaverryan added a commit that referenced this pull request Oct 2, 2013
@weaverryan
Copy link
Member

Hey Michael!

I think this is a great idea. I've patched your changes into the 2.2 branch at sha: a73bc77, sha: 3fb6353 and sha: 3324e1c

I personally don't like the ACL system and think that it's useful in only the most complex cases (which I haven't run into personally). But I'm not sure if it's been useful to other people, so I'm careful to not make it look like a terrible alternative. Still, I've taken your message further at sha: 74897e3.

If anyone has any issues, or if we're bullying ACL's too much, then speak! Again, it's my personal opinion that voters are a much easier way to solve this problem.

Thanks!

@weaverryan weaverryan closed this Oct 2, 2013
@monbro
Copy link
Author

monbro commented Oct 2, 2013

Cool! Again, my aim is not to blame ACL, but to make it even more clear that this is not the one way to go. Cheers.

@monbro
Copy link
Author

monbro commented Oct 2, 2013

In addition, I would love to see to point more out, that ACL is working upfront and it is very difficult to make heavy changes afterwards to it. While the opposite/alternative (voters) are doing their job just in time (checking the conditions on use).

weaverryan added a commit that referenced this pull request Oct 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants