Skip to content

Commit b51bd60

Browse files
author
Jon Bendtsen
committed
giving a slight better error message
1 parent d8bade2 commit b51bd60

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

htdocs/contrat/class/api_contracts.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public function post($request_data = null)
211211
throw new RestException(403, "Insufficient rights");
212212
}
213213
if (!DolibarrApiAccess::$user->hasRight('societe', 'client', 'voir')) {
214-
throw new RestException(403, 'Access not allowed for login '.DolibarrApiAccess::$user->login.'. No read permission on thirdparties.');
214+
throw new RestException(403, 'Access not allowed for login '.DolibarrApiAccess::$user->login.'. No read permission on all thirdparties.');
215215
}
216216
// Check mandatory fields
217217
$result = $this->_validate($request_data);
@@ -677,7 +677,7 @@ public function put($id, $request_data = null)
677677
throw new RestException(403);
678678
}
679679
if (!DolibarrApiAccess::$user->hasRight('societe', 'client', 'voir')) {
680-
throw new RestException(403, 'Access not allowed for login '.DolibarrApiAccess::$user->login.'. No read permission on thirdparties.');
680+
throw new RestException(403, 'Access not allowed for login '.DolibarrApiAccess::$user->login.'. No read permission on all thirdparties.');
681681
}
682682
$result = $this->contract->fetch($id);
683683
if (!$result) {

0 commit comments

Comments
 (0)