diff options
author | Rémy Coutable <remy@gitlab.com> | 2016-09-28 09:42:33 +0000 |
---|---|---|
committer | Ruben Davila <rdavila84@gmail.com> | 2016-09-28 10:57:12 -0500 |
commit | fe93a9b4ecf52d7cf861f0fae95c27448d43c015 (patch) | |
tree | a3b3af465b7d80a97097d38f4d1b47af277b1749 /spec/models | |
parent | 26b47b243acd2698db954b03f6d96d75e01152c0 (diff) | |
download | gitlab-ce-fe93a9b4ecf52d7cf861f0fae95c27448d43c015.tar.gz |
Merge branch '18028-respect-fork-project' into 'security'
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.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/18028
See merge request !1996
Diffstat (limited to 'spec/models')
-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 |