Add willIncreaseOverage to billableUserChange
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:
- Create a group, add a ultimate subscription for one seat
- Visit this group page, then Group Information -> Members
http://localhost:3000/groups/<your-group>/-/group_members
. - Click the
Invite members
button. - Add a member in a dropdown, choose
Guest
as a role and clickInvite
. - There should be no modal window.
- Add a member in a dropdown, choose
Developer
as a role and clickInvite
. - 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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Diana Zubova