diff options
author | Nick Thomas <nick@gitlab.com> | 2016-09-19 19:28:41 +0100 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2016-09-27 13:17:56 +0100 |
commit | 3ed80a0176a0c8155ff6f84a8f3e70718babd8ce (patch) | |
tree | 44024da6998dfaabd0de193cb510d8ea96f8fe21 /spec/models/forked_project_link_spec.rb | |
parent | fca610e5cbf5382f3814120227a0ca11440c8a9f (diff) | |
download | gitlab-ce-3ed80a0176a0c8155ff6f84a8f3e70718babd8ce.tar.gz |
Enforce the fork_project permission in Projects::CreateService
Projects::ForkService delegates to this service almost entirely, but needed
one small change so it would propagate create errors correctly.
CreateService#execute needs significant refactoring; it is now right at the
complexity limit set by Rubocop. I avoided doing so in this commit to keep the
diff as small as possible.
Several tests depend on the insecure behaviour of ForkService, so fi them up at
the same time.
Diffstat (limited to 'spec/models/forked_project_link_spec.rb')
-rw-r--r-- | spec/models/forked_project_link_spec.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/models/forked_project_link_spec.rb b/spec/models/forked_project_link_spec.rb index 9c81d159cdf..1863581f57b 100644 --- a/spec/models/forked_project_link_spec.rb +++ b/spec/models/forked_project_link_spec.rb @@ -6,6 +6,7 @@ describe ForkedProjectLink, "add link on fork" do let(:user) { create(:user, namespace: namespace) } before do + create(:project_member, :reporter, user: user, project: project_from) @project_to = fork_project(project_from, user) end |