Bug #86542
closedOverride admin panel settings does nothing
0%
Description
If you try to set user TSConfig to hide some settings in FE admin panel, that doesn't work.
Example (see attached file) :
admPanel {
enable.preview = 1
override.preview.showFluidDebug = 0
override.preview.simulateDate= 0
}
It seems that this configuration doesn't work :
admPanel.override.[modulename].[propertyname]
I didn't test for panels other than 'preview'.
The code involved is here : \TYPO3\CMS\Frontend\View\AdminPanelView->getPreviewModule
You can see that everything is hard coded ignoring TS Config.
Files
Updated by Florian Rival over 5 years ago
- Category set to AdminPanel
- Complexity set to easy
Updated by Susanne Moog about 5 years ago
- Status changed from New to Needs Feedback
As the adminPanel was rewritten in v9 can you check again if it's working ok for you there? Thanks!
Updated by Florian Rival about 5 years ago
Ok the configuration works in version V9.
Updated by Riccardo De Contardi almost 5 years ago
Either I am doing something wrong, or for me the issue is still present on 9.5.5 or 10.0.0-dev
admPanel.override.[modulename].[propertyname]
Does not seem to have any effect. I tried with putting the TSConfig code both in the tsconfig field of a be usergroup and of a be user (non-admin).
Updated by Christian Eßl almost 5 years ago
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.
Updated by Riccardo De Contardi over 4 years ago
- Related to Bug #87895: ViewHelper <f:be.security.ifAuthenticated> does not work for editors added
Updated by Susanne Moog over 4 years ago
- Sprint Focus deleted (
On Location Sprint)
Updated by Susanne Moog over 4 years ago
@Christian:
- Only userTSConfig is meant to work, not page TS Config
- Only pages where the user has access to in the backend should have the admin panel in the frontend (as this is an enhancement for editors working on pages and includes things like cache clearing and previewing - which is only relevant if you have at least minimal permissions for that page)
As far as I can see it behaves as intended here.
Updated by Susanne Moog almost 4 years ago
- Status changed from Needs Feedback to Closed
Closing due to lack of feedback and system behaving as intended (see previous comments).
Updated by Jens Hoppe over 3 years ago
Christian Eßl wrote in #note-6:
- pasting this in the TSConfig of a non-admin beuser and viewing the adminpanel as this user, the settings are ignored
This is exactly what happens in 10.4.10 for me. admPanel.enable
in be_groups.TSconfig
, does work for non-admin be users, admPanel.override
does not. I tested this with a few override options, for example admPanel.override.preview.showFluidDebug = 0
and admPanel.override.cache.noCache = 0
, with both admPanel.enable.preview
and admPanel.enable.cache
set to 1. You would expect the override options to disappear, but they do not.