Update seat related alerts when Restricted Access enabled
What does this MR do and why?
This MR improves the notifications when the Namespace has Seat Control > Restricted Access set, in order to better communicate with the customer. To get to the required outcome (https://gitlab.com/gitlab-org/gitlab/-/issues/469118#note_2348889278), we are changing the reference against which the Threshold banner is set from max_seats to namespace.billable_members_count_with_reactive_cache.
With Seat Control > Restricted Access, a customer could happen to have all seat taken, and see two banners. One saying that all seats are taken (refers to billable count), and one saying that not all seats are taken (refers to max_seats_used ). This makes the experience inconsistent. (The reason is that max_seats_used is updated once a day, and namespace.billable_members_count_with_reactive_cache is a more reliable source.)
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
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 or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
The presentation of the BSO-related notification has also changed
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Ensure you have a Namespace with a plan (
Premiumis easier). Follow this guide: https://gitlab.com/gitlab-org/customers-gitlab-com/-/blob/main/doc/flows/self_service_flow_urls.md#add-a-plan-to-a-group-on-your-local-gitlab-instance-without-going-through-purchase-flow - Enable
block_seat_overagesFF -
Restricted Accessis enabled via Group Settings: https://docs.gitlab.com/user/group/manage/#turn-on-restricted-access - Work with the billable members to reach the conditions to meet the scenarios
- Note: You might need to perform some workers in order to get updated values for billable members, e.g.
GitlabSubscriptions::RefreshSeatsWorker.perform_with_capacity,ActiveUserCountThresholdWorker.perform_sync





