Add "Approve all" button to pending members page
What does this MR do and why?
It adds "Approve All" button to the pending members page.
The button will show a modal asking the user for confirmation before approving.
Note: the MR doesn't include a changelog since the change is behind a disabled feature flag #336251 (closed).
Screenshots or screen recordings
before | after |
---|---|
success | failure | no members |
---|---|---|
screencast |
---|
Screen_Recording_2023-01-24_at_14.25.25 |
How to set up and validate locally
- Set
self.com?
to return true by addingreturn true
after line 58 inlib/gitlab.rb
- Enable
saas_user_caps
feature flag from rails console. (rails console
thenFeature.enable(:saas_user_caps)
) - With a group with an Ultimate plan
- Navigate to
Settings
->Permissions and group features
->User Cap
- Set the user cap limit to
1
- Navigate to the group members
- Add one or more members (until you are above the user cap limit set in previous step)
- Navigate to
Usage Quota
from the left sidebar underSettings
- You should see an alert that you have pending members
- Clicking the button in the alert should navigate to a pending members page
- Observe the "Approve All" button at the top right, clicking it will show a confirmation modal
- After confirming the pending members now should be moved from the
invited
tab to themembers
tab in the group's members page
(Steps credited to Sheldon in !75756 (merged)).
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #334309
Edited by Ammar Alakkad