Surface errors during member invite with overages

What does this MR do and why?

Previously, when there was an error during a member invite that also resulted in an overage, we would not show the error. This is because both the overage modal and the invite modal that shows errors occupy the same slot.

This makes it so when a member invite error occurs in a situation that would also cause an overage, we don't show the overage modal, allowing the errors to be surfaced.

References

Issue: #391943 (closed)

Screenshots or screen recordings

Before After
before after

How to set up and validate locally

Steps to reproduce:

  1. Create a new GitLab group.
  2. Purchase a SaaS premium or Ultimate subscription for the group with 2 seats. (Note: If you are purchasing the subscription directly from Zuora UI then ensure that Seat reconciliation field is enabled since it is needed to trigger the overage modal).
  3. Ensure that zsim is running so that the subscription changes are reflected from Zuora -> CustomersDot -> GDK. Open the group billing page (/groups/<group-path>/-/billings) to confirm that the purchased plan is reflecting there. If it does not reflect, run the script below to sync CustomersDot and GDK (ensure zsim has run the callout for this order so that it is present in CustomersDot local).
order = Order.find(id)
Gitlab::Namespaces::UpdatePlanInfoService.new(order, force_sync: true).execute
  1. Go to the group's manage members page - /groups/test-group-37/-/group_members and add 1 member. Member should be successfully added.
  2. Now go to the settings page for the group and under Permissions and group features section find the setting Restrict membership by email domain. Enter domain to restrict as gitlab.com and click Save changes button.

image

  1. Go back to group's manage members page - /groups/test-group-37/-/group_members and add a member through email id as test@gmail.com. Overage popup should appear since we already have 2 members (which is the number of users purchased for the subscription) and we are trying to add 3rd member.
  2. In the overage popup click Continue.
    • Before: No error is shown and "continue" button appears broken
    • After: Shows original modal with error

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Ryan Cobb

Merge request reports

Loading