fix some style issues
This commit is contained in:
parent
1e6b867378
commit
d224fb49e6
|
@ -234,7 +234,7 @@ App::init(function ($utopia, $request, $response, $console, $project, $consoleDB
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$role = Auth::USER_ROLE_APP;
|
$role = Auth::USER_ROLE_APP;
|
||||||
$scopes = \array_merge($roles[Auth::USER_ROLE_APP]['scopes'], $key->getAttribute('scopes', []));
|
$scopes = \array_merge($roles[$role]['scopes'], $key->getAttribute('scopes', []));
|
||||||
|
|
||||||
Authorization::setRole('role:'.Auth::USER_ROLE_APP);
|
Authorization::setRole('role:'.Auth::USER_ROLE_APP);
|
||||||
Authorization::setDefaultStatus(false); // Cancel security segmentation for API keys.
|
Authorization::setDefaultStatus(false); // Cancel security segmentation for API keys.
|
||||||
|
|
|
@ -430,7 +430,7 @@ App::setResource('user', function($mode, $project, $console, $request, $response
|
||||||
$user = $projectDB->getDocument(Auth::$unique);
|
$user = $projectDB->getDocument(Auth::$unique);
|
||||||
} else {
|
} else {
|
||||||
$user = $consoleDB->getDocument(Auth::$unique);
|
$user = $consoleDB->getDocument(Auth::$unique);
|
||||||
|
|
||||||
$user
|
$user
|
||||||
->setAttribute('$id', 'admin-'.$user->getAttribute('$id'))
|
->setAttribute('$id', 'admin-'.$user->getAttribute('$id'))
|
||||||
;
|
;
|
||||||
|
|
Loading…
Reference in a new issue