[BUGFIX] LocalDriver needs to respect "is_writeable" 13/17413/9
authorGeorg Ringer <georg.ringer@gmail.com>
Thu, 10 Jan 2013 09:37:21 +0000 (10:37 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Sat, 12 Jan 2013 15:29:32 +0000 (16:29 +0100)
The LocalDriver needs also to respect the flag "is_writeable".
This means: if the flag is not set, no folder/file can be edited/moved...

Change-Id: I6fc1edd452555381388bd5bfaa46dd8241dc853b
Fixes: #44370
Releases: 6.0,6.1
Reviewed-on: https://review.typo3.org/17413
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/core/Classes/Resource/ResourceStorage.php

index f25e42e..6cf9edb 100644 (file)
@@ -579,7 +579,7 @@ class ResourceStorage {
                        $isReadCheck = TRUE;
                }
                $isWriteCheck = FALSE;
-               if (in_array($action, array('write', 'delete'))) {
+               if (in_array($action, array('add', 'edit', 'write', 'upload', 'move', 'rename', 'unzip', 'remove'))) {
                        $isWriteCheck = TRUE;
                }
                // Check 3: Check the capabilities of the storage (and the driver)
@@ -625,7 +625,7 @@ class ResourceStorage {
                        $isReadCheck = TRUE;
                }
                $isWriteCheck = FALSE;
-               if (in_array($action, array('write', 'delete', 'deleteRecursive'))) {
+               if (in_array($action, array('add', 'move', 'write', 'remove', 'rename'))) {
                        $isWriteCheck = TRUE;
                }
                // Check 3: Check the capabilities of the storage (and the driver)
@@ -1942,4 +1942,4 @@ class ResourceStorage {
        }
 }
 
-?>
\ No newline at end of file
+?>