[BUGFIX] Wrong exception on renaming folder 62/23862/2
authorFrancois Suter <francois@typo3.org>
Tue, 17 Sep 2013 07:04:05 +0000 (09:04 +0200)
committerFrancois Suter <francois@typo3.org>
Fri, 20 Sep 2013 10:02:18 +0000 (12:02 +0200)
When a user tries to rename a folder without the permissions
to do so, the ResourceStorage throws a
"InsufficientFileAccessPermissionsException" instead of a
"InsufficientUserPermissionsException".

Resolves: #52056
Releases: 6.0, 6.1, 6.2
Change-Id: I83e75038bd6763f201ef03ebf37018368e990e1a
Reviewed-on: https://review.typo3.org/23862
Reviewed-by: Helmut Hummel
Reviewed-by: Frans Saris
Tested-by: Frans Saris
Reviewed-by: Fabien Udriot
Reviewed-by: Francois Suter
Tested-by: Francois Suter
typo3/sysext/core/Classes/Resource/ResourceStorage.php

index c10a092..92b3d2d 100644 (file)
@@ -1715,7 +1715,7 @@ class ResourceStorage {
                // Renaming the folder should check if the parent folder is writable
                // We cannot do this however because we cannot extract the parent folder from a folder currently
                if (!$this->checkFolderActionPermission('rename', $folderObject)) {
-                       throw new \TYPO3\CMS\Core\Resource\Exception\InsufficientFileAccessPermissionsException('You are not allowed to rename the folder "' . $folderObject->getIdentifier() . '\'', 1357811441);
+                       throw new \TYPO3\CMS\Core\Resource\Exception\InsufficientUserPermissionsException('You are not allowed to rename the folder "' . $folderObject->getIdentifier() . '\'', 1357811441);
                }
 
                $returnObject = NULL;