[BUGFIX] Admin users should ignore user mounts 10/29110/7
authorPascal Dürsteler <pascal@notionlab.ch>
Thu, 3 Apr 2014 08:10:29 +0000 (10:10 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Sun, 13 Apr 2014 10:13:59 +0000 (12:13 +0200)
Admin user records still process earlier defined mounts which leads
to a cluttered page tree or filelist tree, respectively.

Resolves: #57587
Releases: 6.2
Change-Id: I9cae20da90f4f796db8a8831a09e5f4d029ae249
Reviewed-on: https://review.typo3.org/29110
Reviewed-by: Dmitry Dulepov
Tested-by: Dmitry Dulepov
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php

index 6ed2056..c218bc3 100644 (file)
@@ -1335,10 +1335,14 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                        $this->dataLists['allowed_languages'] = $this->user['allowed_languages'];
                        // Set user value for workspace permissions.
                        $this->dataLists['workspace_perms'] = $this->user['workspace_perms'];
-                       // Database mountpoints
-                       $this->dataLists['webmount_list'] = $this->user['db_mountpoints'];
-                       // File mountpoints
-                       $this->dataLists['filemount_list'] = $this->user['file_mountpoints'];
+                       // User mount points are only added if the user is not an admin as admins do not have visible
+                       // mountpoints fields. Processing them loads mountpoints defined when the user was a non-admin.
+                       if (!$this->isAdmin()) {
+                               // Database mountpoints
+                               $this->dataLists['webmount_list'] = $this->user['db_mountpoints'];
+                               // File mountpoints
+                               $this->dataLists['filemount_list'] = $this->user['file_mountpoints'];
+                       }
                        // Fileoperation permissions
                        $this->dataLists['file_permissions'] = $this->user['file_permissions'];
                        // Setting default User TSconfig: