diff options
author | Go MAEDA <maeda@farend.jp> | 2023-01-20 03:32:40 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2023-01-20 03:32:40 +0000 |
commit | e7bfab6f4309b83dd5e195d2acbb4f196035c462 (patch) | |
tree | cace1be9e29b0c21533ae81114f02659b8b95d26 /app | |
parent | f9f617caa3dab03d4594b826effe171d65f77338 (diff) | |
download | redmine-e7bfab6f4309b83dd5e195d2acbb4f196035c462.tar.gz redmine-e7bfab6f4309b83dd5e195d2acbb4f196035c462.zip |
Merged r22066 from trunk to 5.0-stable (#38063).
git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@22067 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/application_controller.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index d400bdca8..2c070ed67 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -354,9 +354,12 @@ class ApplicationController < ActionController::Base # and authorize the user for the requested action def find_optional_project if params[:project_id].present? - find_project(params[:project_id]) + @project = Project.find(params[:project_id]) end authorize_global + rescue ActiveRecord::RecordNotFound + User.current.logged? ? render_404 : require_login + false end # Finds and sets @project based on @object.project |