8000 Add a RoleType that allows to select roles among the ones in the hierarchy by Cydonia7 · Pull Request #20728 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Add a RoleType that allows to select roles among the ones in the hierarchy #20728

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 1 commit into from
Closed

Conversation

Cydonia7
Copy link
Contributor
@Cydonia7 Cydonia7 commented Dec 2, 2016
Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #10212
License MIT
Doc PR Not yet

This PR adds a RoleType to the security bundle that extends the existing ChoiceType in order to select roles for a user.

This can be used for instance in an admin backend to edit permissions.

@xabbuh
Copy link
Member
xabbuh commented Dec 3, 2016

The issue with your solution is that it's perfectly fine to have a configuration where not all roles are part of the role hierarchy. So you would end up with incomplete choices.

@Cydonia7
Copy link
Contributor Author
Cydonia7 commented Dec 3, 2016

I'm aware of this limitation, I thought users could add the missing roles to their configuration if they want to add them to the field (using an empty array as value).

Do we have better choices to be more complete?

@HeahDude
Copy link
Contributor
HeahDude commented Dec 3, 2016

Hey @Cydonia7 thank you for working on this. What @xabbuh pointed out is true, so this type is not that useful if one needs to define each roles in his configuration to get the full list of choices.

This does not bring any real value, one just needs to use a ChoiceType and define the choices himself.

Being aware of roles used in an application is not worth it so sadly to me it's 👎, and I propose to close the related issue as a "won't fix".

@Cydonia7 Cydonia7 closed this Dec 3, 2016
@Cydonia7 Cydonia7 deleted the role-type branch December 3, 2016 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0