Fix PHPCS

This commit is contained in:
jfefe 2015-05-12 16:42:35 +02:00
commit 125a34cb34
2 changed files with 32 additions and 23 deletions

View File

@ -44,6 +44,7 @@ class DolibarrApiAccess implements iAuthenticate
*/
public static $user = '';
// @codingStandardsIgnoreStart
/**
* @return string string to be used with WWW-Authenticate header
@ -60,6 +61,7 @@ class DolibarrApiAccess implements iAuthenticate
*/
public function _isAllowed()
{
// @codingStandardsIgnoreEnd
global $db;
$stored_key = '';
@ -113,6 +115,13 @@ class DolibarrApiAccess implements iAuthenticate
return in_array(static::$role, (array) static::$requires) || static::$role == 'admin';
}
// @codingStandardsIgnoreStart
public function __getWWWAuthenticateString()
{
return '';
}
// @codingStandardsIgnoreEnd
/**
* Verify access
*

View File

@ -48,7 +48,7 @@ if (empty($conf->global->MAIN_MODULE_API))
}
use Luracast\Restler\Defaults;
Defaults::setProperty('authenticationMethod','_isAllowed');
$api = new DolibarrApi($db);