mirror of
https://github.com/redmine/redmine.git
synced 2025-12-23 17:00:29 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user