mirror of
https://github.com/redmine/redmine.git
synced 2025-11-04 20:35:57 +01:00
Creating time tracking entry for other user through rest API fails with 403 (#32774).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@19669 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -288,6 +288,14 @@ class TimelogController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def find_optional_project
|
||||
if params[:project_id].present? || params[:time_entry].present? && params[:time_entry][:project_id].present?
|
||||
project_id = params[:project_id] || params[:time_entry][:project_id]
|
||||
find_project(project_id)
|
||||
end
|
||||
authorize_global
|
||||
end
|
||||
|
||||
# Returns the TimeEntry scope for index and report actions
|
||||
def time_entry_scope(options={})
|
||||
@query.results_scope(options)
|
||||
|
||||
Reference in New Issue
Block a user