Skip to content
Snippets Groups Projects
Commit da0fac2a authored by Jean-François Ferry's avatar Jean-François Ferry
Browse files

Minor fix into rest API : use implemented method name

parent bcd254c1
No related branches found
No related tags found
No related merge requests found
......@@ -52,7 +52,7 @@ class DolibarrApiAccess implements iAuthenticate
* @return bool
* @throws RestException
*/
public function _isAllowed()
public function __isAllowed()
{
global $db;
......@@ -114,7 +114,7 @@ class DolibarrApiAccess implements iAuthenticate
* @example Digest
* @example OAuth
*/
public function _getWWWAuthenticateString()
public function __getWWWAuthenticateString()
{
return '';
}
......
......
......@@ -48,7 +48,6 @@ if (empty($conf->global->MAIN_MODULE_API))
}
use \Luracast\Restler\Defaults;
Defaults::setProperty('authenticationMethod','_isAllowed');
$api = new DolibarrApi($db);
......@@ -113,12 +112,12 @@ foreach ($modulesdir as $dir)
$classname=$reg[1];
$classname = str_replace('Api_','',ucwords($reg[1])).'Api';
require_once $dir_part.$file_searched;
if(class_exists($classname))
if(class_exists($classname)) {
$api->r->addAPIClass($classname,'');
}
}
}
}
}
}
}
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment