File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
services/backend/src/routes/gateway/config Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 11import { type FastifyInstance } from 'fastify' ;
22import { requireAuthenticationAny , requireOAuthScope } from '../../../middleware/oauthMiddleware' ;
3+ import { requirePermission } from '../../../middleware/roleMiddleware' ;
34import {
45 CLIENT_PARAM_SCHEMA ,
56 SUCCESS_RESPONSE_SCHEMA ,
@@ -63,7 +64,8 @@ export default async function getClientConfig(server: FastifyInstance) {
6364 server . get ( '/gateway/config/:client' , {
6465 preValidation : [
6566 requireAuthenticationAny ( ) ,
66- requireOAuthScope ( 'gateway:config:read' )
67+ requireOAuthScope ( 'gateway:config:read' ) ,
68+ requirePermission ( 'gateway.config:read' )
6769 ] ,
6870 schema : {
6971 tags : [ 'Gateway Configuration' ] ,
Original file line number Diff line number Diff line change 11import { type FastifyInstance } from 'fastify' ;
22import { requireAuthenticationAny , requireOAuthScope } from '../../../middleware/oauthMiddleware' ;
3+ import { requirePermission } from '../../../middleware/roleMiddleware' ;
34import {
45 CLIENT_TYPES ,
56 CLIENTS_LIST_RESPONSE_SCHEMA ,
@@ -12,7 +13,8 @@ export default async function listClients(server: FastifyInstance) {
1213 server . get ( '/gateway/config/clients' , {
1314 preValidation : [
1415 requireAuthenticationAny ( ) ,
15- requireOAuthScope ( 'gateway:config:read' )
16+ requireOAuthScope ( 'gateway:config:read' ) ,
17+ requirePermission ( 'gateway.config:read' )
1618 ] ,
1719 schema : {
1820 tags : [ 'Gateway Configuration' ] ,
You can’t perform that action at this time.
0 commit comments