Update api_holidays.class.php
This commit is contained in:
parent
34f78f581b
commit
f9dbe91c3f
1 changed files with 4 additions and 4 deletions
|
|
@ -365,7 +365,7 @@ class Holidays extends DolibarrApi
|
|||
if (!DolibarrApi::_checkAccessToResource('holiday', $this->holiday->id)) {
|
||||
throw new RestException(403, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
|
||||
$this->holiday->status = Holiday::STATUS_VALIDATED;
|
||||
$result = $this->holiday->validate(DolibarrApiAccess::$user, $notrigger);
|
||||
if ($result == 0) {
|
||||
|
|
@ -448,7 +448,7 @@ class Holidays extends DolibarrApi
|
|||
if (!DolibarrApiAccess::$user->hasRight('holiday', 'write')) {
|
||||
throw new RestException(403, "Insufficient rights");
|
||||
}
|
||||
|
||||
|
||||
$result = $this->holiday->fetch($id);
|
||||
if (!$result) {
|
||||
throw new RestException(404, 'Holiday not found');
|
||||
|
|
@ -495,7 +495,7 @@ class Holidays extends DolibarrApi
|
|||
if (!DolibarrApiAccess::$user->hasRight('holiday', 'approve')) {
|
||||
throw new RestException(403, "Insufficient rights");
|
||||
}
|
||||
|
||||
|
||||
$result = $this->holiday->fetch($id);
|
||||
if (!$result) {
|
||||
throw new RestException(404, 'Holiday not found');
|
||||
|
|
@ -545,7 +545,7 @@ class Holidays extends DolibarrApi
|
|||
if (!DolibarrApiAccess::$user->hasRight('holiday', 'write')) {
|
||||
throw new RestException(403, "Insufficient rights");
|
||||
}
|
||||
|
||||
|
||||
$result = $this->holiday->fetch($id);
|
||||
if (!$result) {
|
||||
throw new RestException(404, 'Holiday not found');
|
||||
|
|
|
|||
Loading…
Reference in a new issue