Add free user limit pre-enforcement alert
What does this MR do and why?
Add free user limit pre-enforcement alert
Adds a pre-enforcement alert component to notify Free-tier private group namespaces above the user limit and storage limit about the 5-user limit enforcement
The pre-enforcement alerts are gated behind the free_user_cap_pre_enforcement_banner feature flag
Depends on !237120 (merged)
References
Screenshots or screen recordings
| user | UI | Copy |
|---|---|---|
| Group owner |
Your namespace free user limit test is over the 5 user limit Free top-level namespaces with private visibility cannot have more than 5 users. From August 15, 2026, if your namespace has more than 5 users, it will be placed in a read-only state. To prevent this, reduce the number of users in the namespace, make the namespace public, upgrade to a paid tier, or start a free 30-day Ultimate trial. Primary CTA: Explore paid plans Secondary CTA: Contact sales |
|
| Non group owner |
Your namespace free user limit test is over the 5 user limit Free top-level namespaces with private visibility cannot have more than 5 users. From August 15, 2026, if your namespace has more than 5 users, it will be placed in a read-only state. Contact your top-level group Owner to reduce the number of users in the namespace, make the namespace public, upgrade to a paid tier, or start a free 30-day Ultimate trial. |
How to set up and validate locally
-
Start GDK in SaaS mode:
export GITLAB_SIMULATE_SAAS=1 -
Create a Free-tier private top-level group
-
In the rails console:
::Gitlab::CurrentSettings.update!(dashboard_limit_enabled: true, dashboard_limit: 5) Plan.free.limits.update!(storage_size_limit: 30) group = Group.find <group_id> # group you created in step 2 group.root_storage_statistics.update!(storage_size: 35.megabytes) -
Verify setup before continuing
::Namespaces::FreeUserCap::RootSize.new(group).above_size_limit? # should return true -
Navigate to any page in the group (e.g. group members page): verify that the pre-enforcement banner is not shown (because the user count is below the limit)
-
Add 5 members to the group so the member count exceeds the dashboard limit (6+ users)
-
Refresh the page: verify the pre-enforcement banner is still not shown (banner FF is disabled)
-
In the rails console, enable the pre-enforcement banner FF, and ensure the enforcement FF is disabled
Feature.enable(:free_user_cap_pre_enforcement_banner, group) Feature.disable(:free_user_cap_without_storage_check, group) -
Refresh the page: verify that the pre-enforcement owner banner appears
- Sign in as a non-owner of the group: verify the non owner pre-enforcement banner appears
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

