@@ -34,7 +34,8 @@ export class ConfigController {
3434 }
3535
3636 @Post ( '/' )
37- @UseGuards ( JwtAuthGuard )
37+ @UseGuards ( JwtAuthGuard , PermissionsGuard )
38+ @Permissions ( 'config:write' )
3839 @UseGuards ( ReadonlyGuard )
3940 @ApiBearerAuth ( 'bearerAuth' )
4041 @ApiOperation ( { summary : 'Update the Kubero settings' } )
@@ -50,7 +51,7 @@ export class ConfigController {
5051
5152 @Get ( '/banner' )
5253 @UseGuards ( JwtAuthGuard , PermissionsGuard )
53- @Permissions ( 'config:read' )
54+ @Permissions ( 'config:read' , 'config:write' )
5455 @ApiBearerAuth ( 'bearerAuth' )
5556 @ApiOperation ( { summary : 'Get the banner informations' } )
5657 @ApiForbiddenResponse ( {
@@ -64,7 +65,7 @@ export class ConfigController {
6465
6566 @Get ( '/templates' )
6667 @UseGuards ( JwtAuthGuard , PermissionsGuard )
67- @Permissions ( 'config:read' )
68+ @Permissions ( 'config:read' , 'config:write' )
6869 @ApiBearerAuth ( 'bearerAuth' )
6970 @ApiOperation ( { summary : 'Get the templates settings' } )
7071 @ApiForbiddenResponse ( {
@@ -78,7 +79,7 @@ export class ConfigController {
7879
7980 @Get ( '/registry' )
8081 @UseGuards ( JwtAuthGuard , PermissionsGuard )
81- @Permissions ( 'config:read' )
82+ @Permissions ( 'config:read' , 'config:write' )
8283 @ApiBearerAuth ( 'bearerAuth' )
8384 @ApiOperation ( { summary : 'Get the registry settings' } )
8485 @ApiForbiddenResponse ( {
@@ -92,7 +93,7 @@ export class ConfigController {
9293
9394 @Get ( '/runpacks' )
9495 @UseGuards ( JwtAuthGuard , PermissionsGuard )
95- @Permissions ( 'config:read' )
96+ @Permissions ( 'config:read' , 'config:write' )
9697 @ApiBearerAuth ( 'bearerAuth' )
9798 @ApiOperation ( { summary : 'List runpacks' } )
9899 @ApiForbiddenResponse ( {
@@ -106,7 +107,7 @@ export class ConfigController {
106107
107108 @Delete ( '/runpacks/:id' )
108109 @UseGuards ( JwtAuthGuard , PermissionsGuard )
109- @Permissions ( 'config:read' , 'config: write')
110+ @Permissions ( 'config:write' )
110111 @ApiBearerAuth ( 'bearerAuth' )
111112 @ApiOperation ( { summary : 'Delete a runpack' } )
112113 @ApiForbiddenResponse ( {
@@ -121,7 +122,7 @@ export class ConfigController {
121122
122123 @Post ( '/runpacks' )
123124 @UseGuards ( JwtAuthGuard , PermissionsGuard , ReadonlyGuard )
124- @Permissions ( 'config:read' , 'config: write')
125+ @Permissions ( 'config:write' )
125126 @ApiBearerAuth ( 'bearerAuth' )
126127 @ApiOperation ( { summary : 'Add a new runpack' } )
127128 @ApiForbiddenResponse ( {
@@ -153,7 +154,7 @@ export class ConfigController {
153154
154155 @Get ( '/clusterissuer' )
155156 @UseGuards ( JwtAuthGuard , PermissionsGuard )
156- @Permissions ( 'config:read' )
157+ @Permissions ( 'config:read' , 'config:write' )
157158 @ApiBearerAuth ( 'bearerAuth' )
158159 @ApiOperation ( { summary : 'Get the configured cluster issuer' } )
159160 @ApiForbiddenResponse ( {
@@ -174,7 +175,7 @@ export class ConfigController {
174175
175176 @Get ( '/podsizes' )
176177 @UseGuards ( JwtAuthGuard , PermissionsGuard )
177- @Permissions ( 'config:read' )
178+ @Permissions ( 'config:read' , 'config:write' )
178179 @ApiBearerAuth ( 'bearerAuth' )
179180 @ApiForbiddenResponse ( {
180181 description : 'Error: Unauthorized' ,
@@ -188,7 +189,7 @@ export class ConfigController {
188189
189190 @Post ( '/podsizes' )
190191 @UseGuards ( JwtAuthGuard , PermissionsGuard , ReadonlyGuard )
191- @Permissions ( 'config:read' , 'config: write')
192+ @Permissions ( 'config:write' )
192193 @ApiBearerAuth ( 'bearerAuth' )
193194 @ApiForbiddenResponse ( {
194195 description : 'Error: Unauthorized' ,
@@ -252,7 +253,7 @@ export class ConfigController {
252253
253254 @Delete ( '/podsizes/:id' )
254255 @UseGuards ( JwtAuthGuard , PermissionsGuard , ReadonlyGuard )
255- @Permissions ( 'config:read' , 'config: write')
256+ @Permissions ( 'config:write' )
256257 @ApiBearerAuth ( 'bearerAuth' )
257258 @ApiForbiddenResponse ( {
258259 description : 'Error: Unauthorized' ,
@@ -270,7 +271,7 @@ export class ConfigController {
270271
271272 @Put ( '/podsizes/:id' )
272273 @UseGuards ( JwtAuthGuard , PermissionsGuard , ReadonlyGuard )
273- @Permissions ( 'config:read' , 'config: write')
274+ @Permissions ( 'config:write' )
274275 @ApiBearerAuth ( 'bearerAuth' )
275276 @ApiForbiddenResponse ( {
276277 description : 'Error: Unauthorized' ,
0 commit comments