Minor fix into rest API : use implemented method name
This commit is contained in:
parent
bcd254c137
commit
da0fac2ac6
@ -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,'');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user