Merge pull request #18840 from homer8173/patch-23
it was impossible to update a task
This commit is contained in:
commit
89b24f1690
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user