@@ -34,7 +34,8 @@ export class ConfigController {
34
34
}
35
35
36
36
@Post ( '/' )
37
- @UseGuards ( JwtAuthGuard )
37
+ @UseGuards ( JwtAuthGuard , PermissionsGuard )
38
+ @Permissions ( 'config:write' )
38
39
@UseGuards ( ReadonlyGuard )
39
40
@ApiBearerAuth ( 'bearerAuth' )
40
41
@ApiOperation ( { summary : 'Update the Kubero settings' } )
@@ -50,7 +51,7 @@ export class ConfigController {
50
51
51
52
@Get ( '/banner' )
52
53
@UseGuards ( JwtAuthGuard , PermissionsGuard )
53
- @Permissions ( 'config:read' )
54
+ @Permissions ( 'config:read' , 'config:write' )
54
55
@ApiBearerAuth ( 'bearerAuth' )
55
56
@ApiOperation ( { summary : 'Get the banner informations' } )
56
57
@ApiForbiddenResponse ( {
@@ -64,7 +65,7 @@ export class ConfigController {
64
65
65
66
@Get ( '/templates' )
66
67
@UseGuards ( JwtAuthGuard , PermissionsGuard )
67
- @Permissions ( 'config:read' )
68
+ @Permissions ( 'config:read' , 'config:write' )
68
69
@ApiBearerAuth ( 'bearerAuth' )
69
70
@ApiOperation ( { summary : 'Get the templates settings' } )
70
71
@ApiForbiddenResponse ( {
@@ -78,7 +79,7 @@ export class ConfigController {
78
79
79
80
@Get ( '/registry' )
80
81
@UseGuards ( JwtAuthGuard , PermissionsGuard )
81
- @Permissions ( 'config:read' )
82
+ @Permissions ( 'config:read' , 'config:write' )
82
83
@ApiBearerAuth ( 'bearerAuth' )
83
84
@ApiOperation ( { summary : 'Get the registry settings' } )
84
85
@ApiForbiddenResponse ( {
@@ -92,7 +93,7 @@ export class ConfigController {
92
93
93
94
@Get ( '/runpacks' )
94
95
@UseGuards ( JwtAuthGuard , PermissionsGuard )
95
- @Permissions ( 'config:read' )
96
+ @Permissions ( 'config:read' , 'config:write' )
96
97
@ApiBearerAuth ( 'bearerAuth' )
97
98
@ApiOperation ( { summary : 'List runpacks' } )
98
99
@ApiForbiddenResponse ( {
@@ -106,7 +107,7 @@ export class ConfigController {
106
107
107
108
@Delete ( '/runpacks/:id' )
108
109
@UseGuards ( JwtAuthGuard , PermissionsGuard )
109
- @Permissions ( 'config:read' , 'config: write')
110
+ @Permissions ( 'config:write' )
110
111
@ApiBearerAuth ( 'bearerAuth' )
111
112
@ApiOperation ( { summary : 'Delete a runpack' } )
112
113
@ApiForbiddenResponse ( {
@@ -121,7 +122,7 @@ export class ConfigController {
121
122
122
123
@Post ( '/runpacks' )
123
124
@UseGuards ( JwtAuthGuard , PermissionsGuard , ReadonlyGuard )
124
- @Permissions ( 'config:read' , 'config: write')
125
+ @Permissions ( 'config:write' )
125
126
@ApiBearerAuth ( 'bearerAuth' )
126
127
@ApiOperation ( { summary : 'Add a new runpack' } )
127
128
@ApiForbiddenResponse ( {
@@ -153,7 +154,7 @@ export class ConfigController {
153
154
154
155
@Get ( '/clusterissuer' )
155
156
@UseGuards ( JwtAuthGuard , PermissionsGuard )
156
- @Permissions ( 'config:read' )
157
+ @Permissions ( 'config:read' , 'config:write' )
157
158
@ApiBearerAuth ( 'bearerAuth' )
158
159
@ApiOperation ( { summary : 'Get the configured cluster issuer' } )
159
160
@ApiForbiddenResponse ( {
@@ -174,7 +175,7 @@ export class ConfigController {
174
175
175
176
@Get ( '/podsizes' )
176
177
@UseGuards ( JwtAuthGuard , PermissionsGuard )
177
- @Permissions ( 'config:read' )
178
+ @Permissions ( 'config:read' , 'config:write' )
178
179
@ApiBearerAuth ( 'bearerAuth' )
179
180
@ApiForbiddenResponse ( {
180
181
description : 'Error: Unauthorized' ,
@@ -188,7 +189,7 @@ export class ConfigController {
188
189
189
190
@Post ( '/podsizes' )
190
191
@UseGuards ( JwtAuthGuard , PermissionsGuard , ReadonlyGuard )
191
- @Permissions ( 'config:read' , 'config: write')
192
+ @Permissions ( 'config:write' )
192
193
@ApiBearerAuth ( 'bearerAuth' )
193
194
@ApiForbiddenResponse ( {
194
195
description : 'Error: Unauthorized' ,
@@ -252,7 +253,7 @@ export class ConfigController {
252
253
253
254
@Delete ( '/podsizes/:id' )
254
255
@UseGuards ( JwtAuthGuard , PermissionsGuard , ReadonlyGuard )
255
- @Permissions ( 'config:read' , 'config: write')
256
+ @Permissions ( 'config:write' )
256
257
@ApiBearerAuth ( 'bearerAuth' )
257
258
@ApiForbiddenResponse ( {
258
259
description : 'Error: Unauthorized' ,
@@ -270,7 +271,7 @@ export class ConfigController {
270
271
271
272
@Put ( '/podsizes/:id' )
272
273
@UseGuards ( JwtAuthGuard , PermissionsGuard , ReadonlyGuard )
273
- @Permissions ( 'config:read' , 'config: write')
274
+ @Permissions ( 'config:write' )
274
275
@ApiBearerAuth ( 'bearerAuth' )
275
276
@ApiForbiddenResponse ( {
276
277
description : 'Error: Unauthorized' ,
0 commit comments