1
0
Fork 0
mirror of synced 2024-06-02 19:04:49 +12:00

Fixed missing permissions

This commit is contained in:
Eldad Fux 2021-04-23 09:31:22 +03:00
parent a12db546ea
commit 04d53eab7a
2 changed files with 7 additions and 5 deletions

View file

@ -452,6 +452,7 @@ App::patch('/v1/projects/:projectId/auth/limit')
->desc('Update Project users limit')
->groups(['api', 'projects'])
->label('scope', 'projects.write')
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
->label('sdk.namespace', 'projects')
->label('sdk.method', 'updateAuthLimit')
->label('sdk.response.code', Response::STATUS_CODE_OK)
@ -486,6 +487,7 @@ App::patch('/v1/projects/:projectId/auth/:method')
->desc('Update Project auth method status. Use this endpoint to enable or disable a given auth method for this project.')
->groups(['api', 'projects'])
->label('scope', 'projects.write')
->label('sdk.auth', [APP_AUTH_TYPE_ADMIN])
->label('sdk.namespace', 'projects')
->label('sdk.method', 'updateAuthStatus')
->label('sdk.response.code', Response::STATUS_CODE_OK)

View file

@ -370,11 +370,11 @@ App::get('/specs/:format')
$models = $response->getModels();
// foreach ($models as $key => $value) {
// if($platform !== APP_PLATFORM_CONSOLE && !$value->isPublic()) {
// unset($models[$key]);
// }
// }
foreach ($models as $key => $value) {
if($platform !== APP_PLATFORM_CONSOLE && !$value->isPublic()) {
unset($models[$key]);
}
}
switch ($format) {
case 'swagger2':