Skip to content

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.

Seat Control: Off
User approaching the purchased seat count Screenshot_2025-02-18_at_16.26.52
User reached the purchased seat count Screenshot_2025-02-19_at_07.47.54
Seat Control: Restricted Access
User approaching the purchased seat count Screenshot_2025-02-18_at_16.42.34
User reached the purchased seat count Screenshot_2025-02-19_at_07.38.22

The presentation of the BSO-related notification has also changed

Before After
Screenshot_2025-02-18_at_16.58.56 Screenshot_2025-02-19_at_07.38.22

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Ensure you have a Namespace with a plan (Premium is 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
  2. Enable block_seat_overages FF
  3. Restricted Access is enabled via Group Settings: https://docs.gitlab.com/user/group/manage/#turn-on-restricted-access
  4. Work with the billable members to reach the conditions to meet the scenarios
  5. 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
Edited by Angelo Gulina

Merge request reports

Loading