[FOLLOWUP][BUGFIX] Make category tree filterable for editors 78/54978/2
authorChristoph Lehmann <christoph.lehmann@networkteam.com>
Thu, 7 Dec 2017 21:53:35 +0000 (22:53 +0100)
committerSusanne Moog <susanne.moog@typo3.org>
Sat, 9 Dec 2017 20:33:59 +0000 (21:33 +0100)
Check if TCEFORM.pages.categories.config.treeConfig.rootUid
itself is in the users category mounts (no need for a pseudo
parent category)

Resolves: #83257
Releases: master,8.7,7.6
Change-Id: I8a60860ee3a22d68964f4e44018f0962f7f0f278
Reviewed-on: https://review.typo3.org/54978
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/backend/Classes/Security/CategoryPermissionsAspect.php

index bdef965..c6e0d90 100644 (file)
@@ -67,6 +67,9 @@ class CategoryPermissionsAspect
 
                 // Check the rootline against categoryMountPoints when tree was filtered
                 if ($dataProvider->getRootUid() !== null) {
+                    if (in_array($dataProvider->getRootUid(), $categoryMountPoints)) {
+                        return;
+                    }
                     $uidsInRootline = $this->findUidsInRootline($dataProvider->getRootUid());
                     if (!empty(array_intersect($categoryMountPoints, $uidsInRootline))) {
                         // One of the parents was found in categoryMountPoints so all children are secure