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_cta feature 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
Disabled "Explore paid plans" .com group billing page
Enabled "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

  1. Enable the owner enforcement banner locally for a Free-tier private top-level group.

    Steps to render banner
    1. Start GDK in SaaS mode:

      export GITLAB_SIMULATE_SAAS=1
    2. Create a Free-tier private top-level group

    3. 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)
    4. Navigate to group members page: http://localhost:3000/groups/<group_path>/-/group_members

    5. Add members until the group exceeds dashboard limit (6+ users)

    6. Enable enforcement FF

      Feature.enable(:free_user_cap_without_storage_check, group)
    7. Refresh page and the enforcement banner should appear

  2. With the promo flag off (default), the banner's primary CTA reads "Explore paid plans" and redirect to group "Billing" page.

  3. 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)
  1. 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
  2. (Optional full checkout flow) To test the promo end-to-end with Cdot, enable zuora_promo_code_first_order_purchase feature flag and start local CDot instance. The CTA should redirect to the CDot checkout with the promo applied.
    • Note: zuora_promo_code_first_order_purchase is already fully enabled in production, no changes for Cdot is needed for deployment, enabling it locally is only needed for local testing.

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 Shabini Rajadas

Merge request reports

Loading