Ensure overage modal appears for Projects

What does this MR do and why?

This fixes two bugs:

  1. Ensures the overage modal appears when adding members to a Project.
  2. Ensures the overage modal shows the top-level group name (which is where the subscription is applied to)

References

Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/504131

Screenshots or screen recordings

See below

How to set up and validate locally

Setup

  1. Make sure your GDK is linked to Cdot and you have Zsim running
  2. Create a group
  3. Go to Settings -> Billing
  4. Click on "Upgrade to Premium"
  5. Buy the subscription for 1 seat
  6. Return to the group's billing page in Gitlab
  7. If the billing page is still showing that you are using the "Free Plan" you can force a sync from a Cdot rails console with Gitlab::Namespaces::UpdatePlanInfoService.new(Order.last, force_sync: true).execute

No harm testing existing behavior

  1. From the Group, go to Manage -> Members
  2. Click "Invite Members"
  3. Invite a new user or random email to the group with "maintainer" or higher access level.
  4. Notice the overage modal triggers with the correct group name CleanShot_2025-06-02_at_14.03.01_2x

Testing new fixed behavior

  1. Create a new Project under the group
  2. Under the new Project, go to Manage -> Members
  3. Click on "Invite Members"
  4. Invite a new user or random email to the Project with "maintainer" or higher access level.
  5. Before: the overage modal would not trigger. After: Overage modal appears with correct top-level group name CleanShot_2025-06-02_at_14.24.22_2x

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 Ryan Cobb

Merge request reports

Loading