Prevent User Caps from being available
What does this MR do and why?
Based on certain conditions, we will prevent the User Cap functionality from being available. This commit sets up the foundation for implementing this logic over coming iterations.
Refs https://gitlab.com/gitlab-org/gitlab/-/issues/443705
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.
Before | After |
---|---|
How to set up and validate locally
- Add multiple users to a group
- Enable User Caps for the group (Group > Settings > User Cap > Set to a lower number than that you added above, e.g. 1)
- Visit the group members page (
/groups/your-group/-/group_members
) and confirm you see the blue user cap banner - Enable the feature flag (
Feature.enable(:ramon)
) - Confirm the banner from above is no longer visible
- Confirm the settings from above are no longer visible
- Confirm pending members page returns a 404 (
/groups/your-group/-/usage_quotas/pending_members
) - Confirm you can continue to add members to the group
Numbered steps to set up and validate the change are strongly suggested.
Edited by Vijay Hawoldar