Commit 94105ea9 authored by Fabio Pitino's avatar Fabio Pitino

Merge branch 'vij-pending-members-alert' into 'master'

Hide user cap alert if viewing pending members

See merge request gitlab-org/gitlab!79618
parents 738ec5cd 8a70a652
...@@ -7,6 +7,7 @@ module EE ...@@ -7,6 +7,7 @@ module EE
return false unless root_namespace.user_cap_available? return false unless root_namespace.user_cap_available?
return false if alert_has_been_dismissed?(root_namespace) return false if alert_has_been_dismissed?(root_namespace)
return false if current_page?(pending_members_group_usage_quotas_path(root_namespace))
can?(current_user, :admin_namespace, root_namespace) && root_namespace.user_cap_reached?(use_cache: true) can?(current_user, :admin_namespace, root_namespace) && root_namespace.user_cap_reached?(use_cache: true)
end end
......
...@@ -85,6 +85,13 @@ RSpec.describe 'Namespace user cap reached alert', :feature, :js, :use_clean_rai ...@@ -85,6 +85,13 @@ RSpec.describe 'Namespace user cap reached alert', :feature, :js, :use_clean_rai
expect_banner_to_be_absent expect_banner_to_be_absent
end end
it 'does not display on pending members page' do
sign_in(owner)
visit pending_members_group_usage_quotas_path(group)
expect_banner_to_be_absent
end
it 'can be dismissed' do it 'can be dismissed' do
sign_in(owner) sign_in(owner)
visit group_path(group) visit group_path(group)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment