Add eligibility check to overage alert
What does this MR do and why?
Only show the overage alert to groups enrolled in quarterly reconciliation.
Currently we show overage modal on user/group invite to any group with paid SaaS subscription. But as overage is only happening for subscriptions enrolled into reconciliation, we want to only show it to the users of these groups. CustomersDot provides an endpoint where we could consume this information from.
Related to #353457 (closed)
Screenshots or screen recordings
Members | Groups |
---|---|
Example subscription
Screen_Recording_2022-05-24_at_16.32.192
How to set up and validate locally
This MR affect two flow: adding a user to a group and adding a group to a group. The initial setup is same for both flows.
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)
Add user to a group
case
For a - Create a group, add a premium subscription for one seat
- Visit this group page, then Group Information -> Members
http://localhost:3000/groups/<your-group>/-/group_members
. - Click the
Invite member
button. - Add one more user in the dropdown and click
Invite
. - Check the modal.
Add group to a group
case
For a - Create a group, add a premium subscription for one seat
- Visit this group page, then Group Information -> Members
http://localhost:3000/groups/<your-group>/-/group_members
. - Click the
Invite group
button. - Add a group in the dropdown and click
Invite
. - Check the modal.
Now we need to check that for subscriptions not eligible for reconciliation the overage window won't show up
The simplest way to do it is to manipulate the output of CustomersDot Subscription.rb and return false
on perform_reconciliations?
Repeat both cases, the overage modal should not appear.
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.