Repository navigation
Fixes #9482: A user could be assigned to a parent group if he is already assigned to a subgroup. - #10785
Conversation
4839c94 to
22db324
Compare
|
Thanks for contributing to this project with this pull request! Please add This will help collaboration on GitHub in two ways:
Thanks! |
There was a problem hiding this comment.
Thank you for the test.
Sadly, the fix is not valid. The isMemberOf accounts for recursive walk of group hierarchy. This is not the case with the code proposed in this PR which only checks the direct assignment of a user to groups.
|
@hmlnarik In the light of #12726 (reply in thread), do you think this could be merged? Also tests need to be rerun I guess... |
22db324 to
8c5ce2c
Compare
There was a problem hiding this comment.
Thank you for the PR. Could you please rebase, it has conflicts, and also please see inline
8c5ce2c to
b89a6c6
Compare
There was a problem hiding this comment.
Thank you for the changes, looks better now. Could you please see the comments inline?
Nit: For the sake of better readability, leveraging the newly introduced method RoleUtils.isDirectMember in the changed lines which currently use getGroupsStream().{none,any}Match would be preferred.
…ady assigned to a subgroup.
b89a6c6 to
5ccc549
Compare
Closes #9482
Changed precondition for joining a group from is not a member to has group not directly assigned.