Add approve and reject actions to admin pending promotions management
What does this MR do and why?
Adds Approve
and Reject
actions to the admin promotion management panel.
Part of FE: Add a “Pending promotion” tab to the admin ... (#433177 - closed)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
state | Before | After |
---|---|---|
loaded |
![]() |
![]() |
approved | N/A |
![]() |
error while approving | N/A |
![]() |
How to set up and validate locally
- Have an Ultimate License, and simulate Ultimate Self Managed setup (
export GITLAB_SIMULATE_SAAS=0
) - Enable Setting
setting = ApplicationSetting.first; setting.enable_member_promotion_management=true; setting.save!
- Enable FF
Feature.enable(:member_promotion_management)
- Create promotion requests:
- Visit any Group as an owner of that group (e.g.
http://127.0.0.1:3000/groups/gitlab-org/-/group_members
) - try promoting a non-billable GUEST member to a DEVELOPER role (this member should be non-billable on the whole instance, i.e. have a highest role as guest, see !149094 (comment 1869616221) for details)
- you should see a banner saying "Role change request was sent to the administrator." — this means a promotion request has been created
- Visit any Group as an owner of that group (e.g.
- As an admin open Admin area > Users > Promotion Requests (e.g.
http://localhost:3000/admin/role_promotion_requests
) - Try Approving or rejecting some of the requests (blocking network requests is possible now)
Currently its easy to restore those requests: run rails c
+ Members::MemberApproval.update_all(status: :pending)
Storybook
This MR also adds a Storybook story for this app's top component, start the storybook with npm run storybook:start
and open http://localhost:9002/?path=/story/ee-admin-role-promotion-requests-app--default
Edited by Kos Palchyk