diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2020-04-05 14:28:06 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2020-04-05 14:28:06 +0000 |
commit | 3fcaff3670d25c872ba1c785ff27277a787f6abb (patch) | |
tree | 76119767ad727d71a6d069beda8b5c11baf2252b /app/controllers/timelog_controller.rb | |
parent | ba27fe1b4ec6578f85e557de70be67c177a69040 (diff) | |
download | redmine-3fcaff3670d25c872ba1c785ff27277a787f6abb.tar.gz redmine-3fcaff3670d25c872ba1c785ff27277a787f6abb.zip |
Creating time tracking entry for other user through rest API fails with 403 (#32774).
git-svn-id: http://svn.redmine.org/redmine/trunk@19670 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/timelog_controller.rb')
-rw-r--r-- | app/controllers/timelog_controller.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/timelog_controller.rb b/app/controllers/timelog_controller.rb index c01e949d6..6379c4511 100644 --- a/app/controllers/timelog_controller.rb +++ b/app/controllers/timelog_controller.rb @@ -279,8 +279,9 @@ class TimelogController < ApplicationController end def find_optional_issue - if params[:issue_id].present? - @issue = Issue.find(params[:issue_id]) + if params[:issue_id].present? || params[:time_entry].present? && params[:time_entry][:issue_id].present? + issue_id = params[:issue_id] || params[:time_entry][:issue_id] + @issue = Issue.find(issue_id) @project = @issue.project authorize else |