Skip to content

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
Screenshot_2023-01-24_at_14.29.03 Screenshot_2023-01-24_at_14.25.13
success failure no members
Screenshot_2023-01-24_at_14.25.42 Screenshot_2023-01-24_at_14.29.49 Screenshot_2023-01-24_at_14.28.07
screencast
Screen_Recording_2023-01-24_at_14.25.25

How to set up and validate locally

  1. Set self.com? to return true by adding return true after line 58 in lib/gitlab.rb
  2. Enable saas_user_caps feature flag from rails console. (rails console then Feature.enable(:saas_user_caps))
  3. With a group with an Ultimate plan
  4. Navigate to Settings -> Permissions and group features -> User Cap
  5. Set the user cap limit to 1
  6. Navigate to the group members
  7. Add one or more members (until you are above the user cap limit set in previous step)
  8. Navigate to Usage Quota from the left sidebar under Settings
  9. You should see an alert that you have pending members
  10. Clicking the button in the alert should navigate to a pending members page
  11. Observe the "Approve All" button at the top right, clicking it will show a confirmation modal
  12. After confirming the pending members now should be moved from the invited tab to the members 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.

Related to #334309

Edited by Ammar Alakkad

Merge request reports