- fixed a bug where admin permissions were not set correctly, closed #589, closed #591

This commit is contained in:
Mark Friedrich
2018-03-20 01:05:00 +01:00
parent 9b6108f9f6
commit 3147efd1b9

View File

@@ -184,6 +184,7 @@ class Controller {
* set/update logged in cookie by character model
* -> store validation data in DB
* @param Model\CharacterModel $character
* @throws \Exception
* @throws \Exception\PathfinderException
*/
protected function setLoginCookie(Model\CharacterModel $character){
@@ -716,11 +717,11 @@ class Controller {
* @return array
*/
static function getScopesByAuthType($authType = ''){
$scopes = (array)self::getEnvironmentData('CCP_ESI_SCOPES');
$scopes = array_filter((array)self::getEnvironmentData('CCP_ESI_SCOPES'));
switch($authType){
case 'admin':
$scopesAdmin = (array)self::getEnvironmentData('CCP_ESI_SCOPES_ADMIN');
$scopesAdmin = array_filter((array)self::getEnvironmentData('CCP_ESI_SCOPES_ADMIN'));
$scopes = array_merge($scopes, $scopesAdmin);
break;
}