forked from Wavyzz/dolibarr
add new rule
This commit is contained in:
@@ -128,8 +128,7 @@ class DolibarrApiAccess implements iAuthenticate
|
||||
$conf->setValues($db);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
throw new RestException(503, 'Error when fetching user api_key :'.$db->error_msg);
|
||||
}
|
||||
|
||||
@@ -157,8 +156,7 @@ class DolibarrApiAccess implements iAuthenticate
|
||||
if ($fuser->admin) {
|
||||
static::$role = 'admin';
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
throw new RestException(401, "Failed to login to API. No parameter 'HTTP_DOLAPIKEY' on HTTP header (and no parameter DOLAPIKEY in URL).");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user