Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8a70a652
Commit
8a70a652
authored
Feb 01, 2022
by
Vijay Hawoldar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide user cap alert if viewing pending members
Changelog: changed EE: true
parent
18642340
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
ee/app/helpers/ee/namespace_user_cap_reached_alert_helper.rb
ee/app/helpers/ee/namespace_user_cap_reached_alert_helper.rb
+1
-0
ee/spec/features/namespace_user_cap_reached_alert_spec.rb
ee/spec/features/namespace_user_cap_reached_alert_spec.rb
+7
-0
No files found.
ee/app/helpers/ee/namespace_user_cap_reached_alert_helper.rb
View file @
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
...
...
ee/spec/features/namespace_user_cap_reached_alert_spec.rb
View file @
8a70a652
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment