Remove group member: option to remove membership of subgroups/projects
What does this MR do?
Solves #321699 (closed) #322058 (closed)
When a member is removed from a group, the user's direct membership in the group is deleted. In addition, all inherited memberships in subgroups and projects disappear. This is all as it should be. But it also removes all direct memberships of the affected user in subgroups and projects - i.e. those memberships that were not inherited but explicitly added.
Since this is not the expected behavior, this MR makes the following changes:
- By default, the direct memberships in subgroups and projects are no longer automatically removed as well.
- In order that this functionality can still be used if required, the option
Also remove direct user membership from subgroups and projects
is introduced in the UI and the parameterremove_sub_memberships=true
in the API.
/cc @bufferoverflow
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry.
-
-
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
- [-] Label as security and @ mention
@gitlab-com/gl-security/appsec
- [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
- [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Jonas Wälter