Skip to content

Add willIncreaseOverage to billableUserChange

Diana Zubova requested to merge dz/383238-update-preview-billable-users-API into master

What does this MR do and why?

Add willIncreaseOverage field to previewbillableuserchangehasoverage API. It compares current billed user count and the one to be after change is done.

Remove the hasOverage field. We are safe to remove this field as the only place it's used is under a feature flag and query willIncreaseOverage on FE instead.

Related to #383238 (closed)

Screenshots or screen recordings

No visible changes

How to set up and validate locally

Example query

query {
	group(fullPath: "h5bp") {
    gitlabSubscriptionsPreviewBillableUserChange(addGroupId: 1, addUserEmails["foo@bar.com"], addUserIds: [1], role: DEVELOPER) {
      willIncreaseOverage
    }
  }
}

Enable the invite modal

Feature.enable(:overage_members_modal)

Make sure that you are running GitLab as SaaS and have check_namespace_plan setting enabled

::Gitlab::CurrentSettings.update(check_namespace_plan: true)

To test members invite:

  1. Create a group, add a ultimate subscription for one seat
  2. Visit this group page, then Group Information -> Members http://localhost:3000/groups/<your-group>/-/group_members.
  3. Click the Invite members button.
  4. Add a member in a dropdown, choose Guest as a role and click Invite.
  5. There should be no modal window.
  6. Add a member in a dropdown, choose Developer as a role and click Invite.
  7. Check the modal window.

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 Diana Zubova

Merge request reports