diff options
author | Małgorzata Ksionek <meksionek@gmail.com> | 2019-04-16 10:20:57 +0200 |
---|---|---|
committer | Małgorzata Ksionek <meksionek@gmail.com> | 2019-04-16 10:20:57 +0200 |
commit | 303ec92ab92942e067f8bc95de27e85b579580c4 (patch) | |
tree | 1a5cb9bee535486a9b880a63d2acb6d9f7d49914 /app/controllers/projects_controller.rb | |
parent | 224916f843d3cc7beff383217d199a8cabfec263 (diff) | |
download | gitlab-ce-303ec92ab92942e067f8bc95de27e85b579580c4.tar.gz |
Update projects controllergroup-project-template-in-paid-features
Diffstat (limited to 'app/controllers/projects_controller.rb')
-rw-r--r-- | app/controllers/projects_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 48f4d7a586d..e88c46144ef 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -36,10 +36,10 @@ class ProjectsController < Projects::ApplicationController # rubocop: disable CodeReuse/ActiveRecord def new - namespace = Namespace.find_by(id: params[:namespace_id]) if params[:namespace_id] - return access_denied! if namespace && !can?(current_user, :create_projects, namespace) + @namespace = Namespace.find_by(id: params[:namespace_id]) if params[:namespace_id] + return access_denied! if @namespace && !can?(current_user, :create_projects, @namespace) - @project = Project.new(namespace_id: namespace&.id) + @project = Project.new(namespace_id: @namespace&.id) end # rubocop: enable CodeReuse/ActiveRecord |