[BUGFIX] AbstractTreeView correct permission handling with non pages
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / Tree / View / AbstractTreeView.php
index f6191af..e3b2752 100644 (file)
@@ -145,7 +145,7 @@ abstract class AbstractTreeView {
         * @see addField()
         * @var array
         */
-       public $fieldArray = array('uid', 'title');
+       public $fieldArray = array('uid', 'pid', 'title');
 
        /**
         * List of other fields which are ALLOWED to set (here, based on the "pages" table!)
@@ -747,7 +747,8 @@ abstract class AbstractTreeView {
                $idH = array();
                // Traverse the records:
                while ($crazyRecursionLimiter > 0 && ($row = $this->getDataNext($res, $subCSSclass))) {
-                       if (!$GLOBALS['BE_USER']->isInWebMount($row['uid'])) {
+                       $pageUid = ($this->table === 'pages') ? $row['uid'] : $row['pid'];
+                       if (!$GLOBALS['BE_USER']->isInWebMount($pageUid)) {
                                // Current record is not within web mount => skip it
                                continue;
                        }