Skip to content

Forward invalid feedback prop on EE invite modal

Diana Zubova requested to merge dz/363376-add-error-handling-on-overage into master

What does this MR do and why?

When user experience /invitations API error adding a member to a group/project with overage, we will automatically show the "main" modal to highlight what is the problem.

Relate to #363376 (closed)

Screenshots or screen recordings

Before After
error_overage_broken error_overage_fix

How to set up and validate locally

Make sure that you have CustomersDot Instance setup and connected to you GitLab instance

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)
  1. Create a group, add a premium subscription for one seat
  2. Double check that the GitlabSubscription.last is in sync and already has 1 seat in use (means next user will cause overage)
  3. Visit this group page, then Group Information -> Members http://localhost:3000/groups/<your-group>/-/group_members.
  4. Click the Invite member button.
  5. Add the same user (owner) to the dropdown and click Invite.
  6. Check the modal, back button and close buttons
  7. Add a different user and make sure that without errors the flow works

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