Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-04-06 15:50:43 +0300
committerDouwe Maan <douwe@gitlab.com>2015-04-06 15:50:43 +0300
commite69e430ce70a0a679214669437c7521611e4b77c (patch)
treed51fd1e790ab354fff6a7a66307993936a34c6c5 /app/controllers
parent45ca39e81bf857cdb58b1a184b8fab0e56c200f7 (diff)
Allow projects to be imported into namespaces user is master of.
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/import/base_controller.rb2
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