feat: Add missing middleware checks to admin app auth clients
This commit is contained in:
@@ -7,10 +7,6 @@ const authorizationList = {
|
||||
action: 'read',
|
||||
subject: 'User',
|
||||
},
|
||||
'/api/v1/admin/app-auth-clients/:appAuthClientId': {
|
||||
action: 'read',
|
||||
subject: 'App',
|
||||
},
|
||||
};
|
||||
|
||||
export const authorizeUser = async (request, response, next) => {
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import { Router } from 'express';
|
||||
import { authenticateUser } from '../../../../helpers/authentication.js';
|
||||
import { authorizeUser } from '../../../../helpers/authorization.js';
|
||||
import getAdminAppAuthClientsAction from '../../../../controllers/api/v1/admin/app-auth-clients/get-app-auth-client.js';
|
||||
|
||||
const router = Router();
|
||||
@@ -8,7 +7,8 @@ const router = Router();
|
||||
router.get(
|
||||
'/:appAuthClientId',
|
||||
authenticateUser,
|
||||
authorizeUser,
|
||||
authorizeAdmin,
|
||||
checkIsEnterprise,
|
||||
getAdminAppAuthClientsAction
|
||||
);
|
||||
|
||||
|
@@ -23,7 +23,6 @@ router.use('/api/v1/automatisch', automatischRouter);
|
||||
router.use('/api/v1/users', usersRouter);
|
||||
router.use('/api/v1/payment', paymentRouter);
|
||||
router.use('/api/v1/app-auth-clients', appAuthClientsRouter);
|
||||
|
||||
router.use('/api/v1/admin/saml-auth-providers', samlAuthProvidersRouter);
|
||||
router.use('/api/v1/admin/roles', rolesRouter);
|
||||
router.use('/api/v1/admin/permissions', permissionsRouter);
|
||||
|
Reference in New Issue
Block a user