-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Added a small note about dynamic role hierarchies #9865
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
Conversation
@javiereguiluz seems good. Just wondering if we should also include the info that it might be possible to re-use existing Symfony classes for it? Here symfony/symfony#21853 (comment) one only needs a custom Edit: or maybe that would be too detailed and then better to create a separate how-to page for it? |
Thanks for the review! I've reworded according to your comments. Is it OK now? |
security.rst
Outdated
you cannot override it dynamically (for example to store the role hierarchy | ||
in a database). If you need that, create a custom | ||
:doc:`security voter </security/voters>` that looks for the user roles in | ||
the database. Another solution is to create a service that implements the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe 😊One solution is ...
instead of Another ...
? because technically creating your own RoleHierarchyVoter
is exactly what the previous sentence suggests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I think its fine as it is 😊
security.rst
Outdated
you cannot override it dynamically (for example to store the role hierarchy | ||
in a database). If you need that, create a custom | ||
:doc:`security voter </security/voters>` that looks for the user roles in | ||
the database. Another solution is to create a service that implements the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I think its fine as it is 😊
To be completely honest, I don't understand this phrase:
What is this solution saying? Are we decorating the existing RoleHierarchyVoter? Are we replacing the original RoleHierarchyVoter provided by Symfony? |
The problem in symfony/symfony#21853 is that Symfony's |
I'm afraid I still don't understand this 😓 Maybe @xabbuh or someone else can try to explain this differently? Thanks! |
@dmaicher after thinking a lot about this, I propose to remove the second solution proposed and leave just the first one. This way we explain the problem and provide our preferred solution based on voters. Is this OK to you? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok fine for me :)
…eguiluz) This PR was squashed before being merged into the 2.8 branch (closes #9865). Discussion ---------- Added a small note about dynamic role hierarchies This fixes #9745. @dmaicher would this pull request be in line with your comments here: symfony/symfony#21853 (comment) ? Thanks! Commits ------- 5230e56 Added a small note about dynamic role hierarchies
This fixes #9745.
@dmaicher would this pull request be in line with your comments here: symfony/symfony#21853 (comment) ? Thanks!