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

Screenshot 2026-05-26 at 3.58.34 PM.png

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

Screenshot 2026-05-27 at 11.04.14 AM.png

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

  1. Start GDK in SaaS mode: export GITLAB_SIMULATE_SAAS=1

  2. Create a Free-tier private top-level group

  3. 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)
  4. Verify setup before continuing

    ::Namespaces::FreeUserCap::RootSize.new(group).above_size_limit? # should return true
  5. 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)

  6. Add 5 members to the group so the member count exceeds the dashboard limit (6+ users)

  7. Refresh the page: verify the pre-enforcement banner is still not shown (banner FF is disabled)

  8. 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)
  9. Refresh the page: verify that the pre-enforcement owner banner appears

    1. 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.

Edited by Katherine Richards

Merge request reports

Loading