-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15568 from strapi/audit-logs/ee-admin
[Audit logs] Move admin code to EE folder
- Loading branch information
Showing
21 changed files
with
62 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
packages/core/admin/admin/src/hooks/useSettingsMenu/utils/adminLinks.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import customAdminLinks from 'ee_else_ce/hooks/useSettingsMenu/utils/customAdminLinks'; | ||
import defaultAdminLinks from './defaultAdminLinks'; | ||
|
||
export default [...customAdminLinks, ...defaultAdminLinks]; |
1 change: 1 addition & 0 deletions
1
packages/core/admin/admin/src/hooks/useSettingsMenu/utils/customAdminLinks.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default []; |
21 changes: 21 additions & 0 deletions
21
packages/core/admin/admin/src/hooks/useSettingsMenu/utils/defaultAdminLinks.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import adminPermissions from '../../../permissions'; | ||
|
||
const defaultAdminLinks = [ | ||
{ | ||
intlLabel: { id: 'global.roles', defaultMessage: 'Roles' }, | ||
to: '/settings/roles', | ||
id: 'roles', | ||
isDisplayed: false, | ||
permissions: adminPermissions.settings.roles.main, | ||
}, | ||
{ | ||
intlLabel: { id: 'global.users' }, | ||
// Init the search params directly | ||
to: '/settings/users?pageSize=10&page=1&sort=firstname', | ||
id: 'users', | ||
isDisplayed: false, | ||
permissions: adminPermissions.settings.users.main, | ||
}, | ||
]; | ||
|
||
export default defaultAdminLinks; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
packages/core/admin/ee/admin/hooks/useSettingsMenu/utils/customAdminLinks.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import adminPermissions from '../../../../../admin/src/permissions'; | ||
|
||
const auditLogsRoutes = strapi.features.isEnabled(strapi.features.auditLogs) | ||
? [ | ||
{ | ||
intlLabel: { id: 'global.auditLogs', defaultMessage: 'Audit Logs' }, | ||
to: '/settings/audit-logs?pageSize=50&page=1&sort=date:DESC', | ||
id: 'auditLogs', | ||
isDisplayed: false, | ||
permissions: adminPermissions.settings.auditLogs.main, | ||
}, | ||
] | ||
: []; | ||
|
||
const customAdminLinks = [...auditLogsRoutes]; | ||
|
||
export default customAdminLinks; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...ages/AuditLogs/ProtectedListPage/index.js → ...ages/AuditLogs/ProtectedListPage/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters