summaryrefslogtreecommitdiff
path: root/app/controllers/import/gitlab_projects_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/import/gitlab_projects_controller.rb')
-rw-r--r--app/controllers/import/gitlab_projects_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/import/gitlab_projects_controller.rb b/app/controllers/import/gitlab_projects_controller.rb
index 3ec173abcdb..36d246d185b 100644
--- a/app/controllers/import/gitlab_projects_controller.rb
+++ b/app/controllers/import/gitlab_projects_controller.rb
@@ -2,8 +2,8 @@ class Import::GitlabProjectsController < Import::BaseController
before_action :verify_gitlab_project_import_enabled
def new
- @namespace_id = project_params[:namespace_id]
- @namespace_name = Namespace.find(project_params[:namespace_id]).name
+ @namespace = Namespace.find(project_params[:namespace_id])
+ return render_404 unless current_user.can?(:create_projects, @namespace)
@path = project_params[:path]
end