mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 18:33:55 +00:00
Create a new admin-actions file for EE and add audit logs actions
This commit is contained in:
parent
b9c09e19fc
commit
e53c3544e6
26
packages/core/admin/ee/server/bootstrap.js
vendored
26
packages/core/admin/ee/server/bootstrap.js
vendored
@ -4,31 +4,17 @@
|
||||
const { features } = require('@strapi/strapi/lib/utils/ee');
|
||||
const executeCEBootstrap = require('../../server/bootstrap');
|
||||
const { getService } = require('../../server/utils');
|
||||
|
||||
const SSO_ACTIONS = [
|
||||
{
|
||||
uid: 'provider-login.read',
|
||||
displayName: 'Read',
|
||||
pluginName: 'admin',
|
||||
section: 'settings',
|
||||
category: 'single sign on',
|
||||
subCategory: 'options',
|
||||
},
|
||||
{
|
||||
uid: 'provider-login.update',
|
||||
displayName: 'Update',
|
||||
pluginName: 'admin',
|
||||
section: 'settings',
|
||||
category: 'single sign on',
|
||||
subCategory: 'options',
|
||||
},
|
||||
];
|
||||
const actions = require('./config/admin-actions');
|
||||
|
||||
module.exports = async () => {
|
||||
const { actionProvider } = getService('permission');
|
||||
|
||||
if (features.isEnabled('sso')) {
|
||||
await actionProvider.registerMany(SSO_ACTIONS);
|
||||
await actionProvider.registerMany(actions.sso);
|
||||
}
|
||||
|
||||
if (features.isEnabled('audit-logs')) {
|
||||
await actionProvider.registerMany(actions.auditLogs);
|
||||
}
|
||||
|
||||
await executeCEBootstrap();
|
||||
|
||||
32
packages/core/admin/ee/server/config/admin-actions.js
Normal file
32
packages/core/admin/ee/server/config/admin-actions.js
Normal file
@ -0,0 +1,32 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
sso: [
|
||||
{
|
||||
uid: 'provider-login.read',
|
||||
displayName: 'Read',
|
||||
pluginName: 'admin',
|
||||
section: 'settings',
|
||||
category: 'single sign on',
|
||||
subCategory: 'options',
|
||||
},
|
||||
{
|
||||
uid: 'provider-login.update',
|
||||
displayName: 'Update',
|
||||
pluginName: 'admin',
|
||||
section: 'settings',
|
||||
category: 'single sign on',
|
||||
subCategory: 'options',
|
||||
},
|
||||
],
|
||||
auditLogs: [
|
||||
{
|
||||
uid: 'audit-logs.read',
|
||||
displayName: 'Read',
|
||||
pluginName: 'admin',
|
||||
section: 'settings',
|
||||
category: 'audit logs',
|
||||
subCategory: 'options',
|
||||
},
|
||||
],
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user