Add promo CTA to Free user limit enforcement alert
What does this MR do and why?
- Add promo primary CTA "Buy now at $19 per user/month" to Free user limit owner enforcement without storage banner (
EnforcementWithoutStorageAlertComponent) - Gate promo CTA behind
free_user_cap_enforcement_promo_ctafeature flag - Fallback to default CTA "Explore paid plans" when no plan detail from Cdot exist
free_user_cap_enforcement_promo_cta FF state |
primary CTA label | redirect behaviour |
|---|---|---|
| "Explore paid plans" | .com group billing page | |
| "Buy now at $19 per user/month" | Cdot subscription checkout link with promo code |
The secondary "Contact sales" CTA and non-owner enforcement alert (NonOwnerEnforcementWithoutStorageAlertComponent) are unchanged.
References
Related to #600408
FF rollout issue: https://gitlab.com/gitlab-org/gitlab/-/work_items/605055
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
-
Enable the owner enforcement banner locally for a Free-tier private top-level group.
Steps to render banner
-
Start GDK in SaaS mode:
export GITLAB_SIMULATE_SAAS=1 -
Create a Free-tier private top-level group
-
Set storage size for newly created group
::Gitlab::CurrentSettings.update!(dashboard_limit_enabled: true, dashboard_limit: 5) Plan.free.limits.update!(storage_size_limit: 30) group = Group.find(<group_id>) # group from step 2 group.root_storage_statistics.update!(storage_size: 35.megabytes) -
Navigate to group members page:
http://localhost:3000/groups/<group_path>/-/group_members -
Add members until the group exceeds dashboard limit (6+ users)
-
Enable enforcement FF
Feature.enable(:free_user_cap_without_storage_check, group) -
Refresh page and the enforcement banner should appear
-
-
With the promo flag off (default), the banner's primary CTA reads "Explore paid plans" and redirect to group "Billing" page.
-
Enable the flag in the Rails console for testing group:
group = Group.find(<group_id>) # free user limit test group
Feature.enable(:free_user_cap_enforcement_promo_cta, group)- Reload the page, the primary CTA should now read "Buy now at $19 per user/month" and redirect to Cdot checkout URL with expected query params
- eg:
http://localhost:5000/subscriptions/new?gl_namespace_id=<NAMESPACE_ID>&plan_id=<PLAN_ID>&promo_code=USER-LIMIT-19-2026
- eg:
- (Optional full checkout flow) To test the promo end-to-end with Cdot, enable
zuora_promo_code_first_order_purchasefeature flag and start local CDot instance. The CTA should redirect to the CDot checkout with the promo applied.- Note:
zuora_promo_code_first_order_purchaseis already fully enabled in production, no changes for Cdot is needed for deployment, enabling it locally is only needed for local testing.
- Note:
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.