Merge pull request #15537 from strapi/audit-logs/route-policy

[Audit logs] Fix route policy
This commit is contained in:
Rémi de Juvigny 2023-01-24 11:29:43 +01:00 committed by GitHub
commit f5931975a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,8 +49,15 @@ module.exports = {
path: '/audit-logs',
handler: 'auditLogs.findMany',
config: {
// @TODO: Check to right permissions
policies: ['admin::isAuthenticatedAdmin'],
policies: [
'admin::isAuthenticatedAdmin',
{
name: 'admin::hasPermissions',
config: {
actions: ['admin::audit-logs.read'],
},
},
],
},
},
{
@ -58,8 +65,15 @@ module.exports = {
path: '/audit-logs/:id',
handler: 'auditLogs.findOne',
config: {
// @TODO: Check to right permissions
policies: ['admin::isAuthenticatedAdmin'],
policies: [
'admin::isAuthenticatedAdmin',
{
name: 'admin::hasPermissions',
config: {
actions: ['admin::audit-logs.read'],
},
},
],
},
},
],