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
b03229ac
Commit
b03229ac
authored
Jan 26, 2022
by
eugielimpin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Exclude admins from verification experiment when creating groups
parent
86b33eb5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
ee/app/helpers/ee/groups_helper.rb
ee/app/helpers/ee/groups_helper.rb
+2
-0
ee/spec/helpers/ee/groups_helper_spec.rb
ee/spec/helpers/ee/groups_helper_spec.rb
+8
-0
No files found.
ee/app/helpers/ee/groups_helper.rb
View file @
b03229ac
...
...
@@ -62,6 +62,8 @@ module EE
override
:require_verification_for_group_creation_enabled?
def
require_verification_for_group_creation_enabled?
# Skip the verification for admins and auditors (added mainly for E2E tests)
return
false
if
current_user
.
can_read_all_resources?
# Experiment should only run when creating top-level groups
return
false
if
params
[
:parent_id
]
...
...
ee/spec/helpers/ee/groups_helper_spec.rb
View file @
b03229ac
...
...
@@ -244,6 +244,14 @@ RSpec.describe GroupsHelper do
it
{
is_expected
.
to
eq
(
false
)
}
end
context
'when user is admin or auditor'
do
before
do
allow
(
current_user
).
to
receive
(
:can_read_all_resources?
).
and_return
(
true
)
end
it
{
is_expected
.
to
eq
(
false
)
}
end
end
context
'when in control path'
do
...
...
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