Testing with the TSConfig:
admPanel {
enable.preview = 1
override.preview.showFluidDebug = 0
override.preview.simulateDate= 0
}
A few scenarios:
- pasting this in the page TSConfig and viewing the adminpanel as admin, the settings are ignored
- pasting this in the admin users TSConfig and viewing the adminpanel as admin, the settings are applied
- pasting this in the TSConfig of a non-admin beuser and viewing the adminpanel as this user, the settings are ignored
So we have a few problems here:
Apparently the adminpanel currently only loads in User TSConfig, not Page TSConfig. Is this supposed to be the case? Then this statement can be ignored.
Second, when logging in as non-admin user which has activated the adminpanel in TSConfig, it can happen that the adminpanel is not shown at all. This is because in StateUtility::isActivatedForUser() the $GLOBALS['BE_USER'] is empty in this case.
I checked around what could explain this behaviour and found a few lines in the PageResolver middleware:
// No access? Then remove user and re-evaluate the page id
if ($this->controller->isBackendUserLoggedIn() && !$GLOBALS['BE_USER']->doesUserHaveAccess($this->controller->page, Permission::PAGE_SHOW)) {
unset($GLOBALS['BE_USER']);
// Register an empty backend user as aspect
$this->setBackendUserAspect(GeneralUtility::makeInstance(Context::class), null);
$this->controller->determineId();
}
This code checks if the logged in beuser has SHOW permissions on the currently viewed page, if not, the beuser object is unset.
So this means, for the adminpanel to work for non-admin beusers, you would alway have to go to the acces module in the backend and set page access permissions for a group the beuser belongs to. In my opinion, the page access permissions are not related to the adminpanel, so I would handle this as a BUG.