mirror of
https://github.com/FriendsOfTYPO3/feedit.git
synced 2024-11-24 07:06:09 +01:00
[BUGFIX] Better check for existing be zuser
This commit is contained in:
parent
5b7ddfc366
commit
76200bfb40
1 changed files with 15 additions and 13 deletions
|
@ -37,20 +37,22 @@ 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) {
|
||||||
[$table, $uid] = explode(':', $parentObject->currentRecord);
|
$configurationService = GeneralUtility::makeInstance(ConfigurationService::class);
|
||||||
$allowedActions = $user->getAllowedEditActions($table, $configuration['editPanel.'] ?? [], $parentObject->data['pid']);
|
if (($configuration['editPanel'] ?? false) && StateUtility::isOpen() && $configurationService->getConfigurationOption('edit', 'displayIcons')) {
|
||||||
$frontendEditPanel = GeneralUtility::makeInstance(FrontendEditPanel::class, $parentObject);
|
[$table, $uid] = explode(':', $parentObject->currentRecord);
|
||||||
return $frontendEditPanel->editPanel(
|
$allowedActions = $user->getAllowedEditActions($table, $configuration['editPanel.'] ?? [], $parentObject->data['pid']);
|
||||||
$content,
|
$frontendEditPanel = GeneralUtility::makeInstance(FrontendEditPanel::class, $parentObject);
|
||||||
$configuration['editPanel.'] ?? [],
|
return $frontendEditPanel->editPanel(
|
||||||
$parentObject->currentRecord,
|
$content,
|
||||||
$parentObject->data,
|
$configuration['editPanel.'] ?? [],
|
||||||
'tt_content',
|
$parentObject->currentRecord,
|
||||||
$allowedActions
|
$parentObject->data,
|
||||||
);
|
'tt_content',
|
||||||
|
$allowedActions
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue