[BUGFIX] hmenu.special = list must evaluate showAccessRestrictedPages 15/40315/5
authorGilles FOUET <gifou@smile.fr>
Tue, 16 Jun 2015 15:59:28 +0000 (17:59 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Tue, 30 Jun 2015 10:13:50 +0000 (12:13 +0200)
For menus of type "list" the option showAccessRestrictedPages is now
taken into account as well and the enableFields omit the fe_group
contraint if the option is set.

Resolves: #16840
Releases: master, 6.2
Change-Id: I4203bf0087367781ecee15fe3aa42deea8d34039
Reviewed-on: http://review.typo3.org/40315
Reviewed-by: Daniel Maier <dani-maier@gmx.de>
Tested-by: Daniel Maier <dani-maier@gmx.de>
Reviewed-by: Frederic Gaus <frederic.gaus@flagbit.de>
Tested-by: Frederic Gaus <frederic.gaus@flagbit.de>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php

index 7aca624..0c30f44 100644 (file)
@@ -754,11 +754,15 @@ abstract class AbstractMenuContentObject {
                if ($specialValue == '') {
                        $specialValue = $this->id;
                }
+               $skippedEnableFields = array();
+               if (!empty($this->mconf['showAccessRestrictedPages'])) {
+                       $skippedEnableFields = array('fe_group' => 1);
+               }
                /** @var RelationHandler $loadDB*/
                $loadDB = GeneralUtility::makeInstance(RelationHandler::class);
                $loadDB->setFetchAllFields(TRUE);
                $loadDB->start($specialValue, 'pages');
-               $loadDB->additionalWhere['pages'] = $this->parent_cObj->enableFields('pages');
+               $loadDB->additionalWhere['pages'] = $this->parent_cObj->enableFields('pages', FALSE, $skippedEnableFields);
                $loadDB->getFromDB();
                foreach ($loadDB->itemArray as $val) {
                        $MP = $this->tmpl->getFromMPmap($val['id']);