diff options
author | Kamil TrzciĆski <kamil@gitlab.com> | 2019-01-28 12:12:30 +0000 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2019-01-31 16:52:50 +0100 |
commit | d4c7214799586a9b5063b0ea5b4327bbffe1170f (patch) | |
tree | 5e39656039d6f73e19b4cbc3575dba65d44aee4d /spec/policies/ci/pipeline_policy_spec.rb | |
parent | 4b868ba8e71be9aa5591378555122d76c27ac777 (diff) | |
download | gitlab-ce-d4c7214799586a9b5063b0ea5b4327bbffe1170f.tar.gz |
[master] Pipelines section is available to unauthorized users
Diffstat (limited to 'spec/policies/ci/pipeline_policy_spec.rb')
-rw-r--r-- | spec/policies/ci/pipeline_policy_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/policies/ci/pipeline_policy_spec.rb b/spec/policies/ci/pipeline_policy_spec.rb index 8022f61e67d..844d96017de 100644 --- a/spec/policies/ci/pipeline_policy_spec.rb +++ b/spec/policies/ci/pipeline_policy_spec.rb @@ -75,6 +75,14 @@ describe Ci::PipelinePolicy, :models do end end + context 'when user does not have access to internal CI' do + let(:project) { create(:project, :builds_disabled, :public) } + + it 'disallows the user from reading the pipeline' do + expect(policy).to be_disallowed :read_pipeline + end + end + describe 'destroy_pipeline' do let(:project) { create(:project, :public) } |