2023-03-16 15:49:45 +01:00

31 lines
897 B
JavaScript

'use strict';
// eslint-disable-next-line node/no-extraneous-require
const { features } = require('@strapi/strapi/lib/utils/ee');
const executeCEBootstrap = require('../../server/bootstrap');
const { getService } = require('../../server/utils');
const actions = require('./config/admin-actions');
module.exports = async () => {
const { actionProvider } = getService('permission');
if (features.isEnabled('sso')) {
await actionProvider.registerMany(actions.sso);
}
if (features.isEnabled('audit-logs')) {
await actionProvider.registerMany(actions.auditLogs);
}
if (features.isEnabled('review-workflows')) {
const { bootstrap: rwBootstrap } = getService('review-workflows');
await rwBootstrap();
await actionProvider.registerMany(actions.reviewWorkflows);
}
await getService('seat-enforcement').seatEnforcementWorkflow();
await executeCEBootstrap();
};