diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-06 14:50:43 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-06 14:50:43 +0200 |
commit | e69e430ce70a0a679214669437c7521611e4b77c (patch) | |
tree | d51fd1e790ab354fff6a7a66307993936a34c6c5 /app/controllers/import | |
parent | 45ca39e81bf857cdb58b1a184b8fab0e56c200f7 (diff) | |
download | gitlab-ce-e69e430ce70a0a679214669437c7521611e4b77c.tar.gz |
Allow projects to be imported into namespaces user is master of.
Diffstat (limited to 'app/controllers/import')
-rw-r--r-- | app/controllers/import/base_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/import/base_controller.rb b/app/controllers/import/base_controller.rb index edb8bd4160b..93a7ace3530 100644 --- a/app/controllers/import/base_controller.rb +++ b/app/controllers/import/base_controller.rb @@ -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 |