Commit f7cf1a47 authored by Oliver Hader's avatar Oliver Hader Committed by Christian Kuhn
Browse files

[BUGFIX] Separators shown in explicit allow/deny section

The explicit allow/deny section of backend user groups (be_groups)
render separators (--div--) in the backend which need to be skipped.

Change-Id: Iac578d43a7a561618d095819b9d667c613621f2b
Resolves: #82379
Releases: master, 8.7
Reviewed-on: https://review.typo3.org/54009

Reviewed-by: default avatarSimon Praetorius <simon@praetorius.me>
Tested-by: default avatarSimon Praetorius <simon@praetorius.me>
Reviewed-by: Mathias Brodala's avatarMathias Brodala <mbrodala@pagemachine.de>
Tested-by: Mathias Brodala's avatarMathias Brodala <mbrodala@pagemachine.de>
Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Björn Jacob's avatarBjoern Jacob <bjoern.jacob@tritum.de>
Tested-by: Björn Jacob's avatarBjoern Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 915875cf
......@@ -888,33 +888,35 @@ abstract class AbstractItemProvider
$languageService->sL($GLOBALS['TCA'][$table]['ctrl']['title']) . ': '
. $languageService->sL($GLOBALS['TCA'][$table]['columns'][$field]['label']);
foreach ($fieldConfig['items'] as $iVal) {
// Values '' is not controlled by this setting.
if ((string)$iVal[1] !== '') {
// Find iMode
$iMode = '';
switch ((string)$fieldConfig['authMode']) {
case 'explicitAllow':
$itemIdentifier = (string)$iVal[1];
// Values '' and '--div--' are not controlled by this setting.
if ($itemIdentifier === '' || $itemIdentifier === '--div--') {
continue;
}
// Find iMode
$iMode = '';
switch ((string)$fieldConfig['authMode']) {
case 'explicitAllow':
$iMode = 'ALLOW';
break;
case 'explicitDeny':
$iMode = 'DENY';
break;
case 'individual':
if ($iVal[4] === 'EXPL_ALLOW') {
$iMode = 'ALLOW';
break;
case 'explicitDeny':
} elseif ($iVal[4] === 'EXPL_DENY') {
$iMode = 'DENY';
break;
case 'individual':
if ($iVal[4] === 'EXPL_ALLOW') {
$iMode = 'ALLOW';
} elseif ($iVal[4] === 'EXPL_DENY') {
$iMode = 'DENY';
}
break;
}
// Set iMode
if ($iMode) {
$allowDenyOptions[$table . ':' . $field]['items'][$iVal[1]] = [
$iMode,
$languageService->sL($iVal[0]),
$adLabel[$iMode]
];
}
}
break;
}
// Set iMode
if ($iMode) {
$allowDenyOptions[$table . ':' . $field]['items'][$itemIdentifier] = [
$iMode,
$languageService->sL($iVal[0]),
$adLabel[$iMode]
];
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment