Skip to content

Commit ce276c1

Browse files
astehlikirnnr
authored andcommitted
[BUGFIX] Disable fe_group check in UserGroupDetector
A hook is added for the checkEnableFields() method in the TypoScriptFrontendController that overrides the fe_group field with an empty value. This allows the UserGroupDetector to detect content groups within subpages of access protected pages where extendToSubpages is enabled. Resolves: #61955 Change-Id: I04f232f99200786fe06f7c4923259fb60bba5bb9
1 parent f08ec06 commit ce276c1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Classes/IndexQueue/FrontendHelper/UserGroupDetector.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,26 @@ public function activate() {
7474
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['isOutputting'][__CLASS__] = '&Tx_Solr_IndexQueue_FrontendHelper_UserGroupDetector->disableFrontendOutput';
7575
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['tslib_fe-PostProc'][__CLASS__] = '&Tx_Solr_IndexQueue_FrontendHelper_UserGroupDetector->disableCaching';
7676
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['configArrayPostProc'][__CLASS__] = '&Tx_Solr_IndexQueue_FrontendHelper_UserGroupDetector->deactivateTcaFrontendGroupEnableFields';
77+
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_checkEnableFields'][__CLASS__] = '&Tx_Solr_IndexQueue_FrontendHelper_UserGroupDetector->checkEnableFields';
7778

7879
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getPage'][__CLASS__] = '&Tx_Solr_IndexQueue_FrontendHelper_UserGroupDetector';
7980
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getPageOverlay'][__CLASS__] = '&Tx_Solr_IndexQueue_FrontendHelper_UserGroupDetector';
8081

8182
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['postInit'][__CLASS__] = '&Tx_Solr_IndexQueue_FrontendHelper_UserGroupDetector';
8283
}
8384

85+
/**
86+
* Disables the group access check by resetting the fe_group field in the given page table row.
87+
* Will be called by the hook in the TypoScriptFrontendController in the checkEnableFields() method.
88+
*
89+
* @param array $parameters
90+
* @param \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController $tsfe
91+
* @see \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::checkEnableFields()
92+
*/
93+
public function checkEnableFields($parameters, $tsfe) {
94+
$parameters['row']['fe_group'] = '';
95+
}
96+
8497
/**
8598
* Deactivates the frontend user grroup fields in TCA so that no access
8699
* restrictions apply during page rendering.

0 commit comments

Comments
 (0)