Set Namespace to Read-Only if it Has a Seat Overage
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.
And in the upper right corner, I see the button to create new epics.
When the namespace is over the seat count (read-only)
However, here, I do not have the button to create new subgroups.
And I do not have the button to create new epics.
How to set up and validate locally
- Add more billable members to your group than there are seats in the subscription.
- Enable the feature flag:
Feature.enable(:block_seat_overages, group)
- Run in simulating saas mode.
- The namespace should be read-only as seen in the screenshots above.