Skip to content

[WIP] create voters_data_permission.rst article #3138

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 17 commits into from

Conversation

monbro
Copy link

@monbro monbro commented Oct 31, 2013

This is a draft about how the article for a data permission voter could look like. I am happy about feedback. I will try to improve this article the next days.

This pull-request will solve this issue #2877

@xabbuh
Copy link
Member

xabbuh commented Oct 31, 2013

Can you prefix your PR title with [WIP]?

@monbro
Copy link
Author

monbro commented Oct 31, 2013

done

.. index::
single: Security; Data Permission Voters

How to implement your own Voter to check the permission for a object agains a user
Copy link
Contributor

Choose a reason for hiding this comment

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

to check user permissions for accessing a given object


.. code-block:: php

$container
Copy link
Member

Choose a reason for hiding this comment

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

add // src/Acme/DemoBundle/Resources/config/services.php above this line

@xabbuh
Copy link
Member

xabbuh commented Jan 22, 2014

Sorry @monbro for so many comments. I really like the work you have done so far! All these comments are only small issues which should be fixed easily.

@monbro
Copy link
Author

monbro commented Jan 22, 2014

@xabbuh no worries, you are making good points! These conflicts should be solved now. You can have another look.

user is granted access. This method must return one of the following values:

* ``VoterInterface::ACCESS_GRANTED``: The user is allowed to access the
application
Copy link
Member

Choose a reason for hiding this comment

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

these items should start at the same level as the backticks of the previous line. So:

* ``VoterInterface::ACCESS_GRANTED``: The user is allowed to access the
  application

Copy link
Member

Choose a reason for hiding this comment

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

btw, same for the other list items below

@monbro
Copy link
Author

monbro commented Feb 19, 2014

So ready for another review!

@weaverryan
Copy link
Member

Hi @monbro and everyone!

I'm very excited to have this entry! I've just rebased it, proofread it, and opened up a new PR (#3594) against the 2.3 branch. Let's continue the conversation there - we're certainly very very close.

Thanks!

@weaverryan weaverryan closed this Feb 20, 2014
weaverryan added a commit that referenced this pull request Mar 4, 2014
This PR was merged into the 2.3 branch.

Discussion
----------

New Data Voter Article (continuation)

Hiya guys!

This is just a continuation of #3138 by @monbro. I needed to rebase it against the 2.3 branch (which had conflicts), and wanted to proofread it (hence the fresh PR).

Please check out my latest commit to see if I've made any mistakes :).

| Q             | A
| ------------- | ---
| Doc fix?      | no
| New docs?     | yes
| Applies to    | 2.3
| Fixed tickets | #2877

Thanks!

Commits
-------

d3f9383 [#3594] Nice tweaks thanks to @wouterj and @xabbuh
2391758 [#2877][#3138] Proofreading the new voter data permission entry
11aead7 simplified the example
8227270 updated according to the review
da7b97e missed one comment
9b91501 updated the docs according to the last review
872a05f updated the link from ACL to the data permission voters
1fd3b0e updated docs according to the review
5275230 updated with missing fixes
f4eb5f3 updated docs according to the reviews
ee0def1 improved tip box with additional link to /cookbook/security
731dcad updated page with suggestion from the review
1466fa7 improvements according to the reviews
99b1b0f a couple of changes according to the comments, not finished now
2bda150 create voters_data_permission.rst article
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.

10 participants