BigW Consortium Gitlab

Commit e69e430c by Douwe Maan

Allow projects to be imported into namespaces user is master of.

parent 45ca39e8
......@@ -8,7 +8,7 @@ class Import::BaseController < ApplicationController
namespace.add_owner(current_user)
rescue ActiveRecord::RecordNotUnique, ActiveRecord::RecordInvalid
namespace = Namespace.find_by_path_or_name(@target_namespace)
unless namespace.owner == current_user
unless current_user.can?(:create_projects, namespace)
@already_been_taken = true
return false
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