Commit 66e18a12 authored by Nick Thomas's avatar Nick Thomas
Browse files

Don't add admins as masters to projects created in another user's namespace

Only admins have the ability to create a project in another user's personal
namespace. Prior to this commit, we were explicitly adding them as masters to
the project. However, admins already have access (by virture of being admins),
so this is unnecessary.
parent 927c0fc32ba8
......@@ -112,8 +112,7 @@ def setup_authorizations
if group || @project.gitlab_project_import?
owners = [current_user, @project.namespace.owner].compact.uniq
@project.add_master(owners, current_user: current_user)
@project.add_master(@project.namespace.owner, current_user: current_user)
......@@ -38,7 +38,7 @@
expect(project).to be_persisted
expect(project.owner).to eq(user)
expect( include(user, admin)
expect( contain_exactly(user)
expect(project.namespace).to eq(user.namespace)
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