Commit 083a5270 authored by Nikola Milojevic's avatar Nikola Milojevic

Merge branch 'skip-verification-for-admins' into 'master'

Exclude admins from verification experiment when creating groups

See merge request gitlab-org/gitlab!79190
parents 9e34315d 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]
......
......@@ -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
......
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