-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Add convenience method for constructing RoleHierarchy from Map. #3991
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
Add convenience method for constructing RoleHierarchy from Map. #3991
Conversation
Introduced `RoleHierarchyUtils` which enables convenient construction of `RoleHierarchy` from map based representation. Where the map key is the role name and the map value is a list of implied role names. Here is a small example for that in action: https://gist.github.com/thomasdarimont/ee9fffdef1adb9243b12ad247478aad4 Fixes spring-projects#3990. Signed-off-by: Thomas Darimont <thomas.darimont@gmail.com> Signed-off-by: Thomas Darimont <thomas.darimont@gmail.com>
@thomasdarimont Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@thomasdarimont Thank you for signing the Contributor License Agreement! |
Thanks for the PR @thomasdarimont. This would be a valuable feature to add. I reviewed the PR and as you have noted, the tests in Given the implementation of I like the fact that it's leveraging the existing The added changes here is the conversion from a
This will allow for easier testing as well. For example:
All we would really need to test is the conversion of the What do you think? |
Hello @jgrandja, thanks for the feedback - sounds legit to introduce:
to Will you adjust the PR or shall I? |
Can you please adjust the PR @thomasdarimont? I just want to clarify that my proposal was to replace:
with
I want to make sure this is what you understood from my feedback? |
Got it - should have been more precise in my reply... :) Cheers, |
No worries Thomas. |
Thanks again for the PR @thomasdarimont. |
Introduced
RoleHierarchyUtils
which enables convenientconstruction of
RoleHierarchy
from map based representation.Where the map key is the role name and the map value is a list
of implied role names.
Here is a small example for that in action:
https://gist.github.com/thomasdarimont/ee9fffdef1adb9243b12ad247478aad4
Fixes #3990.
Signed-off-by: Thomas Darimont thomas.darimont@gmail.com