Fix PHPCS
This commit is contained in:
commit
125a34cb34
@ -44,6 +44,7 @@ class DolibarrApiAccess implements iAuthenticate
|
|||||||
*/
|
*/
|
||||||
public static $user = '';
|
public static $user = '';
|
||||||
|
|
||||||
|
// @codingStandardsIgnoreStart
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string string to be used with WWW-Authenticate header
|
* @return string string to be used with WWW-Authenticate header
|
||||||
@ -60,6 +61,7 @@ class DolibarrApiAccess implements iAuthenticate
|
|||||||
*/
|
*/
|
||||||
public function _isAllowed()
|
public function _isAllowed()
|
||||||
{
|
{
|
||||||
|
// @codingStandardsIgnoreEnd
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
$stored_key = '';
|
$stored_key = '';
|
||||||
@ -113,6 +115,13 @@ class DolibarrApiAccess implements iAuthenticate
|
|||||||
return in_array(static::$role, (array) static::$requires) || static::$role == 'admin';
|
return in_array(static::$role, (array) static::$requires) || static::$role == 'admin';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @codingStandardsIgnoreStart
|
||||||
|
public function __getWWWAuthenticateString()
|
||||||
|
{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
// @codingStandardsIgnoreEnd
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Verify access
|
* Verify access
|
||||||
*
|
*
|
||||||
|
|||||||
@ -48,7 +48,7 @@ if (empty($conf->global->MAIN_MODULE_API))
|
|||||||
}
|
}
|
||||||
|
|
||||||
use Luracast\Restler\Defaults;
|
use Luracast\Restler\Defaults;
|
||||||
|
Defaults::setProperty('authenticationMethod','_isAllowed');
|
||||||
|
|
||||||
$api = new DolibarrApi($db);
|
$api = new DolibarrApi($db);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user