Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-05 00:09:06 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-05 00:09:06 +0300
commitf4726e9f5029931fc74aee9d5eff93d6a762dcff (patch)
treebc6d47ea3d39afdf46c5df3d8328f3f266c38ae5 /spec/policies
parent7c221ba5ce130ca50b892e6dd32783e1327718df (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/policies')
-rw-r--r--spec/policies/project_policy_spec.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/policies/project_policy_spec.rb b/spec/policies/project_policy_spec.rb
index 6a4a7ecd13e..efa1afb758f 100644
--- a/spec/policies/project_policy_spec.rb
+++ b/spec/policies/project_policy_spec.rb
@@ -865,6 +865,28 @@ RSpec.describe ProjectPolicy do
end
end
+ context 'security configuration feature' do
+ %w(guest reporter).each do |role|
+ context role do
+ let(:current_user) { send(role) }
+
+ it 'prevents reading security configuration' do
+ expect_disallowed(:read_security_configuration)
+ end
+ end
+ end
+
+ %w(developer maintainer owner).each do |role|
+ context role do
+ let(:current_user) { send(role) }
+
+ it 'allows reading security configuration' do
+ expect_allowed(:read_security_configuration)
+ end
+ end
+ end
+ end
+
describe 'design permissions' do
let(:current_user) { guest }