Skip to content

Set Namespace to Read-Only if it Has a Seat Overage

Jason Goodman requested to merge make-namespace-read-only-with-seat-overage into master

What does this MR do and why?

Set the namespace to read-only if it has a seat overage.

If block seat overages is enabled, and the number of seats in use exceeds the number of seats in the subscription, then make the namespace read-only.

Block seat overages is behind a feature flag, and so the changes in this MR are as well.

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

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots

When the namespace is not over the seat count (not read-only)

Notice that in the upper right corner, I see the button to create new subgroups.

Screenshot_2024-03-21_at_4.58.31_PM

And in the upper right corner, I see the button to create new epics.

Screenshot_2024-03-21_at_4.58.38_PM

When the namespace is over the seat count (read-only)

However, here, I do not have the button to create new subgroups.

Screenshot_2024-03-21_at_5.57.47_PM

And I do not have the button to create new epics.

Screenshot_2024-03-21_at_5.57.55_PM

How to set up and validate locally

  1. Add more billable members to your group than there are seats in the subscription.
  2. Enable the feature flag: Feature.enable(:block_seat_overages, group)
  3. Run in simulating saas mode.
  4. The namespace should be read-only as seen in the screenshots above.
Edited by Jason Goodman

Merge request reports