fix: [eventreports] edit ACL lookup fixed

pull/8754/head
iglocska 2022-11-09 14:41:07 +01:00
parent c20678f212
commit 72ca06023f
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 1 additions and 1 deletions

View File

@ -408,7 +408,7 @@ class EventReport extends AppModel
return $report;
} else {
if (in_array('edit', $authorizations) || in_array('delete', $authorizations)) {
$checkResult = $this->ACL->canEditReport($user, $report);
$checkResult = $user['Role']['perm_site_admin'] || ($report['Event']['orgc_id'] === $user['org_id'])
if ($checkResult !== true) {
if ($throwErrors) {
throw new UnauthorizedException($checkResult);