Skip to content

Commit

Permalink
[BUGFIX] Correctly check for permissions of a hidden field in context…
Browse files Browse the repository at this point in the history
… menu

Allow hidden field to not be an exclude field.
See other places in the core where check for check('non_exclude_fields')
is performed.

Resolves: #82785
Releases: master
Change-Id: Id6ab3c7b7dd0c727fe2458eb865c97433184aece
Reviewed-on: https://review.typo3.org/56343
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
  • Loading branch information
tmotyl authored and lolli42 committed Mar 18, 2018
1 parent 030d961 commit 585c44d
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -607,8 +607,11 @@ protected function hasDisableColumnWithValue(int $value): bool
if (isset($GLOBALS['TCA'][$this->table]['ctrl']['enablecolumns']['disabled'])) {
$hiddenFieldName = $GLOBALS['TCA'][$this->table]['ctrl']['enablecolumns']['disabled'];
if (
$hiddenFieldName !== '' && !empty($GLOBALS['TCA'][$this->table]['columns'][$hiddenFieldName]['exclude'])
&& $this->backendUser->check('non_exclude_fields', $this->table . ':' . $hiddenFieldName)
$hiddenFieldName !== '' && !empty($GLOBALS['TCA'][$this->table]['columns'][$hiddenFieldName])
&& (
empty($GLOBALS['TCA'][$this->table]['columns'][$hiddenFieldName]['exclude'])
|| $this->backendUser->check('non_exclude_fields', $this->table . ':' . $hiddenFieldName)
)
) {
return (int)$this->record[$hiddenFieldName] === (int)$value;
}
Expand Down

0 comments on commit 585c44d

Please sign in to comment.