Skip to content

Commit

Permalink
Fix permission check of ajax operations (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmolineus authored Mar 12, 2024
1 parent 459775d commit 3f43eea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/EventListener/DcaAjaxOperationsListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ private function checkPermission(string $table, array $settings): bool
$hasPermission = true;

// Check the permissions
if (($GLOBALS['TL_DCA'][$table]['fields'][$settings['field']]['exclude'] ?? false) && $this->security->isGranted(ContaoCorePermissions::USER_CAN_EDIT_FIELD_OF_TABLE, $table.'::'.$settings['field'])) {
if (($GLOBALS['TL_DCA'][$table]['fields'][$settings['field']]['exclude'] ?? false) && !$this->security->isGranted(ContaoCorePermissions::USER_CAN_EDIT_FIELD_OF_TABLE, $table.'::'.$settings['field'])) {
$hasPermission = false;
}

Expand Down

0 comments on commit 3f43eea

Please sign in to comment.