Skip to content

Add service to preview billable user changes

Ryan Cobb requested to merge rc/preview_billable_user_change_service into master

What does this MR do and why?

Issue: #354768 (closed)

This adds a service that calculates how adding users to a group affects the billable members count for that group.

Nothing uses this yet, but it will eventually sit behind GraphQL (see !90195 (merged)) and will be used by the frontend to display a warning if the additional users will cause the subscription to go into an overage.

There are three ways to add users:

  1. by group
  2. by emails
  3. by user ids

There are a couple things to keep in mind:

  1. We want to deduplicate users so we don't count them multiple times.
  2. Any added email that doesn't have an associated User counts as +1 billable member.
  3. Ultimate subscriptions don't count guests as billable members.

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

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

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Ryan Cobb

Merge request reports