it was impossible to update a task

after some investigation i saw those errors but they are maybe some more around here
This commit is contained in:
Norbert Penel 2021-09-28 13:46:03 +02:00 committed by Laurent Destailleur
parent 98d8bad955
commit 4e86f872ca

View File

@ -454,7 +454,7 @@ class Tasks extends DolibarrApi
throw new RestException(404, 'Task not found');
}
if (!DolibarrApi::_checkAccessToResource('tasks', $this->project->id)) {
if (!DolibarrApi::_checkAccessToResource('task', $this->task->id)) {
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}
foreach ($request_data as $field => $value) {
@ -488,7 +488,7 @@ class Tasks extends DolibarrApi
throw new RestException(404, 'Task not found');
}
if (!DolibarrApi::_checkAccessToResource('tasks', $this->project->id)) {
if (!DolibarrApi::_checkAccessToResource('task', $this->task->id)) {
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}