Skip to content
Snippets Groups Projects
Commit 051c5f41 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix API access protection check #5053

parent fb53b410
No related branches found
No related tags found
No related merge requests found
......@@ -122,7 +122,10 @@ class DolibarrApiAccess implements iAuthenticate
$userClass::setCacheIdentifier(static::$role);
Resources::$accessControlFunction = 'DolibarrApiAccess::verifyAccess';
return in_array(static::$role, (array) static::$requires) || static::$role == 'admin';
$requirefortest = static::$requires;
if (! is_array($requirefortest)) $requirefortest=explode(',',$requirefortest);
return in_array(static::$role, (array) static::$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