Admin can move project to ANY namespace. Updated permissions page
This commit is contained in:
parent
2a1c5cdf99
commit
e376f31507
4 changed files with 64 additions and 57 deletions
|
@ -2,7 +2,9 @@ class ProjectUpdateContext < BaseContext
|
|||
def execute(role = :default)
|
||||
namespace_id = params[:project].delete(:namespace_id)
|
||||
|
||||
if can?(current_user, :change_namespace, project) && namespace_id.present?
|
||||
allowed_transfer = can?(current_user, :change_namespace, project) || role == :admin
|
||||
|
||||
if allowed_transfer && namespace_id.present?
|
||||
if namespace_id == Namespace.global_id
|
||||
if project.namespace.present?
|
||||
# Transfer to global namespace from anyone
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue