提交 e69e430c 编写于 作者: D Douwe Maan

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

上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册