summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-11-02 09:48:22 +0000
committerRémy Coutable <remy@rymai.me>2016-11-02 09:48:22 +0000
commitd733a966e472a2a0377c5758657bba6228a57080 (patch)
treef0f7d4773e7be2e3f15fbcd9a1402f12d077189e /spec/lib
parent90072d61e167915a95c26a9af438ef5b6f1f0b03 (diff)
parent517dd4a3f38ff36feadf5cacf88ce0fdd30be2fe (diff)
downloadgitlab-ce-d733a966e472a2a0377c5758657bba6228a57080.tar.gz
Merge branch 'allow-owner-to-run-ci-builds' into 'master'
Allow owners to fetch source code in CI builds Due to different way of handling owners of a project, they were not allowed to fetch CI sources for project. This adds a separate code path for handling owners, that are not admins. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/23437 See merge request !6943
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/git_access_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/gitlab/git_access_spec.rb b/spec/lib/gitlab/git_access_spec.rb
index a5aa387f4f7..62aa212f1f6 100644
--- a/spec/lib/gitlab/git_access_spec.rb
+++ b/spec/lib/gitlab/git_access_spec.rb
@@ -122,6 +122,14 @@ describe Gitlab::GitAccess, lib: true do
describe 'build authentication_abilities permissions' do
let(:authentication_abilities) { build_authentication_abilities }
+ describe 'owner' do
+ let(:project) { create(:project, namespace: user.namespace) }
+
+ context 'pull code' do
+ it { expect(subject).to be_allowed }
+ end
+ end
+
describe 'reporter user' do
before { project.team << [user, :reporter] }