Skip to content

Update user cap alert to pajamas

Alexander Turinske requested to merge 354599-migrate-user-cap-alert into master

What does this MR do and why?

Update user cap alert to pajamas

  • use global_alert partial

Changelog: changed

EE: true

Screenshots or screen recordings

Before After
Screen_Shot_2022-03-10_at_16.43.47 Screen_Shot_2022-03-10_at_16.48.50

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Implement the following patch
diff --git a/ee/app/views/shared/_namespace_user_cap_reached_alert.html.haml b/ee/app/views/shared/_namespace_user_cap_reached_alert.html.haml
index 0400ed1f255..c463ade55c3 100644
--- a/ee/app/views/shared/_namespace_user_cap_reached_alert.html.haml
+++ b/ee/app/views/shared/_namespace_user_cap_reached_alert.html.haml
@@ -1,7 +1,7 @@
 - return unless current_user
 - namespace = @project&.namespace || @group
 - return unless namespace.present?
-- return unless display_namespace_user_cap_reached_alert?(namespace)
+- return if display_namespace_user_cap_reached_alert?(namespace)
 
 - root_namespace = namespace.root_ancestor
 - pending_users_link = pending_members_group_usage_quotas_path(root_namespace)
  1. Enable saas_user_caps feature flag from rails console. (rails console then Feature.enable(:saas_user_caps))
  2. With a group with an Ultimate plan
  3. Navigate to Settings
  4. You should see an alert that you have pending members

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 #354599 (closed)

Merge request reports