fix: [security] auditlogs's fullChange lack of ACL controls

Added proper ACL handling
- As reported by Jeroen Pinoy
pull/9543/head
Sami Mokaddem 2024-02-01 15:17:53 +01:00
parent cb610a7931
commit 9da67879d4
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 7 additions and 1 deletions

View File

@ -223,8 +223,14 @@ class AuditLogsController extends AppController
public function fullChange($id)
{
$acl = $this->__applyAuditACL($this->Auth->user());
$log = $this->AuditLog->find('first', [
'conditions' => ['id' => $id],
'conditions' => [
'AND' => [
$acl,
'id' => $id
]
],
'recursive' => -1,
'fields' => ['change', 'action'],
]);