Skip to content

Add user limit message

What does this MR do and why?

Currently we do not have any user limit messaging in the Import members from another project modal. Add the same message(s) to this modal for user limit concerns like the invite member modal.

Screenshots or screen recordings

Close to the limit Screenshot_2023-05-17_at_14.15.01
Reached the limit Screenshot_2023-05-17_at_14.19.22
Notification limit Screenshot_2023-05-17_at_14.24.13
No message Screenshot_2023-05-17_at_14.33.07

How to set up and validate locally

In rails console

::Feature.enable(:preview_free_user_cap)
::Feature.enable(:free_user_cap)
::Feature.enable(:free_user_cap_new_namespaces)
  • Sign in as root. Go to Settings -> General -> Free user cap.
  • Disable dashboard limits.
  • Sign in as regular user. Create a project under a private group.
  • Go to members page. Invite 3 members.
  • Sign in as root. Go to Settings -> General -> Free user cap.
  • Enable dashboard limits and set all limits to 4.
  • Set Date to enact enforcement on newly created namespaces in the past.
  • Sign in as regular user. Go to previous project’s member page.
  • Click Import from a project.
  • You should see Close to the limit message.
  • Sign in as root. Go to Settings -> General -> Free user cap.
  • Enable dashboard limits and set all limits to 2.
  • Sign in as regular user. Go to previous project’s member page.
  • Click Import from a project.
  • You should see Reached the limit message.

In rails console

::Feature.disable(:free_user_cap)
::Feature.disable(:free_user_cap_new_namespaces)
  • Reload page. Click Import from a project.
  • You should see Notification limit message.
  • Sign in as root. Go to Settings -> General -> Free user cap.
  • Disable dashboard limits on namespaces.
  • Sign in as regular user. Go to previous project’s member page.
  • Click Import from a project. You should NOT see any messages.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #405008

Edited by Serhii Yarynovskyi

Merge request reports