Merge pull request #2054 from automatisch/aut-1224
Split UpsertSamlAuthProvider mutation into two endpoints
This commit is contained in:
@@ -2,6 +2,8 @@ import { Router } from 'express';
|
||||
import { authenticateUser } from '../../../../helpers/authentication.js';
|
||||
import { authorizeAdmin } from '../../../../helpers/authorization.js';
|
||||
import { checkIsEnterprise } from '../../../../helpers/check-is-enterprise.js';
|
||||
import createSamlAuthProviderAction from '../../../../controllers/api/v1/admin/saml-auth-providers/create-saml-auth-provider.ee.js';
|
||||
import updateSamlAuthProviderAction from '../../../../controllers/api/v1/admin/saml-auth-providers/update-saml-auth-provider.ee.js';
|
||||
import getSamlAuthProvidersAction from '../../../../controllers/api/v1/admin/saml-auth-providers/get-saml-auth-providers.ee.js';
|
||||
import getSamlAuthProviderAction from '../../../../controllers/api/v1/admin/saml-auth-providers/get-saml-auth-provider.ee.js';
|
||||
import getRoleMappingsAction from '../../../../controllers/api/v1/admin/saml-auth-providers/get-role-mappings.ee.js';
|
||||
@@ -16,6 +18,14 @@ router.get(
|
||||
getSamlAuthProvidersAction
|
||||
);
|
||||
|
||||
router.post(
|
||||
'/',
|
||||
authenticateUser,
|
||||
authorizeAdmin,
|
||||
checkIsEnterprise,
|
||||
createSamlAuthProviderAction
|
||||
);
|
||||
|
||||
router.get(
|
||||
'/:samlAuthProviderId',
|
||||
authenticateUser,
|
||||
@@ -32,4 +42,12 @@ router.get(
|
||||
getRoleMappingsAction
|
||||
);
|
||||
|
||||
router.patch(
|
||||
'/:samlAuthProviderId',
|
||||
authenticateUser,
|
||||
authorizeAdmin,
|
||||
checkIsEnterprise,
|
||||
updateSamlAuthProviderAction
|
||||
);
|
||||
|
||||
export default router;
|
||||
|
Reference in New Issue
Block a user