Fix bad permission
This commit is contained in:
parent
3f119c8004
commit
aef164a7ee
@ -295,8 +295,8 @@ class Users extends DolibarrApi
|
||||
public function post($request_data = null)
|
||||
{
|
||||
// Check user authorization
|
||||
if (empty(DolibarrApiAccess::$user->rights->user->creer)) {
|
||||
throw new RestException(401, "User creation not allowed");
|
||||
if (empty(DolibarrApiAccess::$user->rights->user->user->creer)) {
|
||||
throw new RestException(401, "User creation not allowed for login ".DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
// check mandatory fields
|
||||
|
||||
Loading…
Reference in New Issue
Block a user