[BUGFIX] Better check for existing be zuser

This commit is contained in:
Georg Ringer 2023-04-12 06:55:05 +02:00
parent 5b7ddfc366
commit 76200bfb40

View file

@ -37,9 +37,10 @@ class StdWrapEditPanelHook implements ContentObjectStdWrapHookInterface
public function stdWrapPostProcess($content, array $configuration, ContentObjectRenderer &$parentObject) public function stdWrapPostProcess($content, array $configuration, ContentObjectRenderer &$parentObject)
{ {
$configurationService = GeneralUtility::makeInstance(ConfigurationService::class);
$user = $this->getFrontendBackendUser(); $user = $this->getFrontendBackendUser();
if ($user && ($configuration['editPanel'] ?? false) && StateUtility::isOpen() && $configurationService->getConfigurationOption('edit', 'displayIcons')) { if ($user) {
$configurationService = GeneralUtility::makeInstance(ConfigurationService::class);
if (($configuration['editPanel'] ?? false) && StateUtility::isOpen() && $configurationService->getConfigurationOption('edit', 'displayIcons')) {
[$table, $uid] = explode(':', $parentObject->currentRecord); [$table, $uid] = explode(':', $parentObject->currentRecord);
$allowedActions = $user->getAllowedEditActions($table, $configuration['editPanel.'] ?? [], $parentObject->data['pid']); $allowedActions = $user->getAllowedEditActions($table, $configuration['editPanel.'] ?? [], $parentObject->data['pid']);
$frontendEditPanel = GeneralUtility::makeInstance(FrontendEditPanel::class, $parentObject); $frontendEditPanel = GeneralUtility::makeInstance(FrontendEditPanel::class, $parentObject);
@ -52,6 +53,7 @@ class StdWrapEditPanelHook implements ContentObjectStdWrapHookInterface
$allowedActions $allowedActions
); );
} }
}
return $content; return $content;
} }