forked from Wavyzz/dolibarr
Merge remote-tracking branch 'upstream/develop' into psr2squizwhite
This commit is contained in:
@@ -83,7 +83,7 @@ class Interventions extends DolibarrApi
|
||||
throw new RestException(404, 'Intervention report not found');
|
||||
}
|
||||
|
||||
if( ! DolibarrApi::_checkAccessToResource('fichinter',$this->fichinter->id)) {
|
||||
if( ! DolibarrApi::_checkAccessToResource('fichinter', $this->fichinter->id)) {
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
@@ -263,11 +263,11 @@ class Interventions extends DolibarrApi
|
||||
$this->fichinter->$field = $value;
|
||||
}
|
||||
|
||||
if( ! $result ) {
|
||||
if ( ! $result ) {
|
||||
throw new RestException(404, 'Intervention not found');
|
||||
}
|
||||
|
||||
if( ! DolibarrApi::_checkAccessToResource('fichinter',$this->fichinter->id)) {
|
||||
if ( ! DolibarrApi::_checkAccessToResource('fichinter', $this->fichinter->id)) {
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ class Interventions extends DolibarrApi
|
||||
throw new RestException(404, 'Intervention not found');
|
||||
}
|
||||
|
||||
if( ! DolibarrApi::_checkAccessToResource('commande',$this->fichinter->id)) {
|
||||
if( ! DolibarrApi::_checkAccessToResource('commande', $this->fichinter->id)) {
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
@@ -343,7 +343,7 @@ class Interventions extends DolibarrApi
|
||||
throw new RestException(404, 'Intervention not found');
|
||||
}
|
||||
|
||||
if( ! DolibarrApi::_checkAccessToResource('fichinter',$this->fichinter->id)) {
|
||||
if( ! DolibarrApi::_checkAccessToResource('fichinter', $this->fichinter->id)) {
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
@@ -380,7 +380,7 @@ class Interventions extends DolibarrApi
|
||||
throw new RestException(404, 'Intervention not found');
|
||||
}
|
||||
|
||||
if (! DolibarrApi::_checkAccessToResource('fichinter',$this->fichinter->id)) {
|
||||
if (! DolibarrApi::_checkAccessToResource('fichinter', $this->fichinter->id)) {
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user