Commit c8d66514 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'fix-project-creation' into 'master'

Creator should be added as a master of the project on creation

Fixes: #4222

See merge request !2463
parents dec341ca 2ece1b77
...@@ -67,6 +67,7 @@ v 8.4.0 (unreleased) ...@@ -67,6 +67,7 @@ v 8.4.0 (unreleased)
- Improve UX in builds artifacts browser - Improve UX in builds artifacts browser
- Increase default size of `data` column in `events` table when using MySQL - Increase default size of `data` column in `events` table when using MySQL
- Expose button to CI Lint tool on project builds page - Expose button to CI Lint tool on project builds page
- Fix: Creator should be added as a master of the project on creation
v 8.3.4 v 8.3.4
- Use gitlab-workhorse 0.5.4 (fixes API routing bug) - Use gitlab-workhorse 0.5.4 (fixes API routing bug)
......
...@@ -95,7 +95,7 @@ module Projects ...@@ -95,7 +95,7 @@ module Projects
system_hook_service.execute_hooks_for(@project, :create) system_hook_service.execute_hooks_for(@project, :create)
unless @project.group unless @project.group
@project.team << [current_user, :master, current_user] @project.team << [current_user, :master]
end end
@project.import_start if @project.import? @project.import_start if @project.import?
......
...@@ -32,6 +32,7 @@ describe Projects::CreateService, services: true do ...@@ -32,6 +32,7 @@ describe Projects::CreateService, services: true do
it { expect(@project).to be_valid } it { expect(@project).to be_valid }
it { expect(@project.owner).to eq(@user) } it { expect(@project.owner).to eq(@user) }
it { expect(@project.team.masters).to include(@user) }
it { expect(@project.namespace).to eq(@user.namespace) } it { expect(@project.namespace).to eq(@user.namespace) }
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment