Authorization::skip added
This commit is contained in:
parent
dbb05c46ba
commit
4e3bcd6cd0
1 changed files with 6 additions and 7 deletions
|
@ -484,7 +484,7 @@ App::put('/v1/functions/:functionId')
|
||||||
->setAttribute('active', !empty($function->getAttribute('schedule')) && !empty($function->getAttribute('deployment')));
|
->setAttribute('active', !empty($function->getAttribute('schedule')) && !empty($function->getAttribute('deployment')));
|
||||||
|
|
||||||
|
|
||||||
$dbForConsole->updateDocument('schedules', $schedule->getId(), $schedule);
|
Authorization::skip(fn () => $dbForConsole->updateDocument('schedules', $schedule->getId(), $schedule));
|
||||||
|
|
||||||
$eventsInstance->setParam('functionId', $function->getId());
|
$eventsInstance->setParam('functionId', $function->getId());
|
||||||
|
|
||||||
|
@ -1157,8 +1157,7 @@ App::post('/v1/functions/:functionId/executions')
|
||||||
->setData($data)
|
->setData($data)
|
||||||
->setJWT($jwt)
|
->setJWT($jwt)
|
||||||
->setProject($project)
|
->setProject($project)
|
||||||
->setUser($user)
|
->setUser($user);
|
||||||
->trigger();
|
|
||||||
|
|
||||||
return $response
|
return $response
|
||||||
->setStatusCode(Response::STATUS_CODE_ACCEPTED)
|
->setStatusCode(Response::STATUS_CODE_ACCEPTED)
|
||||||
|
@ -1218,10 +1217,10 @@ App::post('/v1/functions/:functionId/executions')
|
||||||
|
|
||||||
// TODO revise this later using route label
|
// TODO revise this later using route label
|
||||||
$usage
|
$usage
|
||||||
->setParam('functionId', $function->getId())
|
->setParam('functionId', $function->getId())
|
||||||
->setParam('executions.{scope}.compute', 1)
|
->setParam('executions.{scope}.compute', 1)
|
||||||
->setParam('executionStatus', $execution->getAttribute('status', ''))
|
->setParam('executionStatus', $execution->getAttribute('status', ''))
|
||||||
->setParam('executionTime', $execution->getAttribute('duration')); // ms
|
->setParam('executionTime', $execution->getAttribute('duration')); // ms
|
||||||
|
|
||||||
$roles = Authorization::getRoles();
|
$roles = Authorization::getRoles();
|
||||||
$isPrivilegedUser = Auth::isPrivilegedUser($roles);
|
$isPrivilegedUser = Auth::isPrivilegedUser($roles);
|
||||||
|
|
Loading…
Reference in a new issue