[UserCap BE] Auto approval of pending members when increasing cap
Why are we doing this work
In &4315, we introduced a User Cap
setting for self-managed admins to prevent accidental user overages, now we are doing the same for SaaS group owners.
This work will be broken down into the following backend steps:
- Add user cap setting
- Adding/inviting members
- Notifications
- Member management
-
Auto Approval
👈 we are here - Approval Modal
- Group access modifications
- Group sharing
- UserCap availability
This issue is to handle adding the auto-approval of pending members when increasing the user cap
There are three scenarios where pending members should be auto-approved:
- Root group user cap setting is disabled (set to
0
ornull
) - handled in https://gitlab.com/gitlab-org/gitlab/-/issues/334381 - Owner increases user cap value
👈🏽 we are here - Owner uses 'approval all' UI button
Relevant links
- Epic: &5803 (closed)
- Designs: #321934[V4.png]
Implementation plan
-
Auto-approve members when increasing User Cap
Additional info
Some more context can be found here: #330028 (comment 609251137).
There is some complexity in this feature in identifying which pending members to approve.
e.g. if if there are 20 pending members, and we increase the user cap by 10, which 10 get auto-approved?
See this thread for some initial discussion around this topic: https://gitlab.com/gitlab-org/gitlab/-/issues/334381#note_735029103
Availability & Testing
- Test the correct members get auto approved depending on the outcome of
👆🏽