Minor fix into rest API : use implemented method name

This commit is contained in:
jfefe 2015-06-15 13:25:02 +02:00
parent bcd254c137
commit da0fac2ac6
2 changed files with 4 additions and 5 deletions

View File

@ -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 '';
}

View File

@ -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,'');
}
}
}
}
}
}
}