[BUGFIX] Disable restricted users to handle page records in pagetree
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / Tree / Pagetree / Commands.php
index b5f6724..76fbd1a 100644 (file)
@@ -120,8 +120,12 @@ class Commands {
         * @return void
         */
        static public function updateNodeLabel(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $node, $updatedLabel) {
-               $data['pages'][$node->getWorkspaceId()][$node->getTextSourceField()] = $updatedLabel;
-               self::processTceCmdAndDataMap(array(), $data);
+               if ($GLOBALS['BE_USER']->checkLanguageAccess(0)) {
+                       $data['pages'][$node->getWorkspaceId()][$node->getTextSourceField()] = $updatedLabel;
+                       self::processTceCmdAndDataMap(array(), $data);
+               } else {
+                       throw new \RuntimeException(implode(chr(10), array('Editing title of page id \'' . $node->getWorkspaceId() .  '\' failed. Editing default language is not allowed.')), 1365513336);
+               }
        }
 
        /**