Only owner of current namespace can change project namespace
This commit is contained in:
parent
f6bfa095bf
commit
2a1c5cdf99
3 changed files with 15 additions and 9 deletions
|
@ -2,7 +2,7 @@ class ProjectUpdateContext < BaseContext
|
|||
def execute(role = :default)
|
||||
namespace_id = params[:project].delete(:namespace_id)
|
||||
|
||||
if namespace_id.present?
|
||||
if can?(current_user, :change_namespace, project) && 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