Skip to content
Snippets Groups Projects
Commit 8b92e552 authored by nka11's avatar nka11
Browse files

fix #5053 and bogus 051c5f41

parent bcb4b2b6
No related branches found
No related tags found
No related merge requests found
......@@ -116,16 +116,13 @@ class DolibarrApiAccess implements iAuthenticate
else
{
throw new RestException(401, "Failed to login to API. No parameter 'api_key' provided");
//dol_syslog("Failed to login to API. No parameter key provided", LOG_DEBUG);
//return false;
}
$userClass::setCacheIdentifier(static::$role);
Resources::$accessControlFunction = 'DolibarrApiAccess::verifyAccess';
$requirefortest = static::$requires;
if (! is_array($requirefortest)) $requirefortest=explode(',',$requirefortest);
return in_array(static::$role, (array) static::$requirefortest) || static::$role == 'admin';
$userClass::setCacheIdentifier(static::$role);
Resources::$accessControlFunction = 'DolibarrApiAccess::verifyAccess';
$requirefortest = static::$requires;
if (! is_array($requirefortest)) $requirefortest=explode(',',$requirefortest);
return in_array(static::$role, (array) $requirefortest) || static::$role == 'admin';
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment