Skip to content

Add free user limit information banner to project members page

Jay Montal requested to merge 365375-jmontal-add-free-user-limit-banner into master

What does this MR do and why?

Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/365375 (Eng: Add banner to Members page for users)

This MR adds a new alert component to the projects members page if the namespace has reached its free user limit.

Alert will only be shown if the following criteria is met:

  1. Free user cap is enforced for the namespace
  2. Free users in namespace is over the limit of 5
  3. User has not already dismissed alert

Screenshots or screen recordings

For Projects: image

For Groups: image

How to set up and validate locally

  1. Start GDK in SaaS mode

  2. Enable free_user_cap feature: Feature.enable(:free_user_cap)

  3. Option 1: Add a minimum of 6 users to namespace.

    Option 2: Flip the logic of namespace_over_limit? in render? method in ee/app/components/namespaces/free_user_cap/free_user_limit_alert_component.rb

  4. Navigate to the Project > Members page

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 #365375

Edited by Jay Montal

Merge request reports