Add info to usage quota for free capped namespaces
What does this MR do and why?
For free namespaces where the free user cap applies, this
- Adds a new card with a link to the billing page
- Shows the maximum number of free seats available based on the cap
- Related Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/352638
- No changelog because it's behind a feature flag
free_user_cap
Screenshots or screen recordings
| Description | Screenshot |
|---|---|
| With subscription | ![]() |
| Free plan without feature flag enabled (current behaviour) | ![]() |
| Free plan with feature flag enabled (new/future behaviour) | ![]() |
How to set up and validate locally
- Start your GDK
export GITLAB_SIMULATE_SAAS=1 gdk start - You want to have three different groups
- A free group
- A free group where the Feature flag is enabled
bin/rails c group = Group.find(1) # Use the ID of the group you want to test Feature.enable(:free_user_cap, group) - A group on a plan (go to http://localhost:3000/admin/groups, choose a group and set a plan). To be able to do this, you need to enable namespace plans:
bin/rails c ApplicationSetting.first.update(check_namespace_plan: true)
- For each group, go to the Usage Quota Page: http://localhost:3000/groups/GROUP_NAME/-/usage_quotas#seats-quota-tab
Note: As you have likely not set a correct subscription for the group with the plan, the "max seats for subscription" or "seats owed` number will be "0"
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.
Edited by Nicolas Dular


