[BUGFIX] Allow shortcuts to edit module 07/50107/2
authorNicole Cordes <typo3@cordes.co>
Fri, 7 Oct 2016 13:57:48 +0000 (15:57 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 29 Oct 2016 10:49:47 +0000 (12:49 +0200)
As the shortcut to edit a record is named "xMOD_alt_doc.php" and hasn't
any module configuration, it needs proper handling to verify the shortcut.
Due to some code changes in master, this patch is needed in 7.6 only.

Resolves: #76926
Releases: 7.6
Change-Id: I2e2113983ae7a056275efeee2f328ced8fd69ef3
Reviewed-on: https://review.typo3.org/50107
Tested-by: TYPO3com <no-reply@typo3.com>
Tested-by: Sybille Peters <peters@rrzn.uni-hannover.de>
Tested-by: Oliver Heins <o.heins@bitmotion.de>
Tested-by: Helmut Hummel <typo3@helhum.io>
Reviewed-by: Helmut Hummel <typo3@helhum.io>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/Backend/ToolbarItems/ShortcutToolbarItem.php

index fb20917..6fa99b5 100644 (file)
@@ -283,7 +283,9 @@ class ShortcutToolbarItem implements ToolbarItemInterface
             }
             // Check for module access
             $moduleName = $row['M_module_name'] ?: $row['module_name'];
             }
             // Check for module access
             $moduleName = $row['M_module_name'] ?: $row['module_name'];
-            if (!isset($this->getLanguageService()->moduleLabels['tabs_images'][$moduleName . '_tab'])) {
+            if (!isset($this->getLanguageService()->moduleLabels['tabs_images'][$moduleName . '_tab'])
+                && $moduleName !== 'xMOD_alt_doc.php'
+            ) {
                 // Nice hack to check if the user has access to this module
                 // - otherwise the translation label would not have been loaded :-)
                 continue;
                 // Nice hack to check if the user has access to this module
                 // - otherwise the translation label would not have been loaded :-)
                 continue;