Use ApplicationController#find_optional_project instead.

git-svn-id: http://svn.redmine.org/redmine/trunk@16720 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2017-06-26 19:40:16 +00:00
parent f3523f25fd
commit d5bec063e7
2 changed files with 25 additions and 7 deletions

View File

@@ -114,13 +114,6 @@ class QueriesController < ApplicationController
render_404
end
def find_optional_project
@project = Project.find(params[:project_id]) if params[:project_id]
render_403 unless User.current.allowed_to?(:save_queries, @project, :global => true)
rescue ActiveRecord::RecordNotFound
render_404
end
def update_query_from_params
@query.project = params[:query_is_for_all] ? nil : @project
@query.build_from_params(params)