From 2ba79868ce1cf8afbb460e7d283701c39feb8e72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20E=C3=9Fl?= <indy.essl@gmail.com> Date: Tue, 10 Mar 2020 19:54:03 +0100 Subject: [PATCH] [BUGFIX] Show correct context menu for file mounts It must not be possible to perform rename/copy/cut/delete actions on a file mount and this is already respected in the FilemountsProvider context menu and used in the filelist svg tree. However, the docheader section in the top right corner of the filelist module showed the wrong context menu for file mounts, which made it possible for editors to perform these actions. Resolves: #90677 Releases: master, 9.5 Change-Id: Iac10b18a4fa3249de9b9c29a0102b3832c933841 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63674 Tested-by: TYPO3com <noreply@typo3.com> Tested-by: Susanne Moog <look@susi.dev> Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de> Reviewed-by: Susanne Moog <look@susi.dev> Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de> --- .../backend/Classes/Template/Components/MetaInformation.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/typo3/sysext/backend/Classes/Template/Components/MetaInformation.php b/typo3/sysext/backend/Classes/Template/Components/MetaInformation.php index 7ac685c7667c..5f7b392ac4d1 100644 --- a/typo3/sysext/backend/Classes/Template/Components/MetaInformation.php +++ b/typo3/sysext/backend/Classes/Template/Components/MetaInformation.php @@ -211,7 +211,9 @@ class MetaInformation Icon::SIZE_SMALL )->render() . '</span>'; } - $theIcon = BackendUtility::wrapClickMenuOnIcon($iconImg, 'sys_file', $pageRecord['combined_identifier']); + $tableName = ($resourceObject->getIdentifier() === $resourceObject->getStorage()->getRootLevelFolder()->getIdentifier()) + ? 'sys_filemounts' : 'sys_file'; + $theIcon = BackendUtility::wrapClickMenuOnIcon($iconImg, $tableName, $pageRecord['combined_identifier']); } catch (ResourceDoesNotExistException $e) { $theIcon = ''; } -- GitLab