]> source.dussan.org Git - nextcloud-server.git/commitdiff
add deleteAllFileKeys to public interface and add "uid" as parameter for the
authorBjoern Schiessle <schiessle@owncloud.com>
Fri, 27 Mar 2015 10:46:32 +0000 (11:46 +0100)
committerBjoern Schiessle <schiessle@owncloud.com>
Fri, 27 Mar 2015 10:51:53 +0000 (11:51 +0100)
update call

lib/private/encryption/update.php
lib/public/encryption/iencryptionmodule.php
lib/public/encryption/keys/istorage.php

index 649cf0285a64e3f6b0aae03c7d2552e778490580..06dc330151e7297aa0b5c6333f9778e5e14462c7 100644 (file)
@@ -104,7 +104,7 @@ class Update {
 
                        foreach ($allFiles as $path) {
                                $usersSharing = $this->util->getSharingUsersArray($path);
-                               $encryptionModule->update($absPath, $usersSharing);
+                               $encryptionModule->update($absPath, $this->uid, $usersSharing);
                        }
        }
 
index 2527e35e63956c48fbe386e174d4021466e102de..7265fee12590a8881b5cba68bc8231eb58e970e6 100644 (file)
@@ -84,10 +84,11 @@ interface IEncryptionModule {
         * update encrypted file, e.g. give additional users access to the file
         *
         * @param string $path path to the file which should be updated
+        * @param string $uid of the user who performs the operation
         * @param array $accessList who has access to the file contains the key 'users' and 'public'
         * @return boolean
         */
-       public function update($path, $accessList);
+       public function update($path, $uid, $accessList);
 
        /**
         * should the file be encrypted or not
index 24f6efd6e5151e7986c906d92b6cc8b551f37193..4c2b01f4ad0c068f90aec8dbaf5c71f2f7a6ab09 100644 (file)
@@ -104,6 +104,14 @@ interface IStorage {
         */
        public function deleteFileKey($path, $keyId);
 
+       /**
+        * delete all file keys for a given file
+        *
+        * @param string $path to the file
+        * @return boolean
+        */
+       public function deleteAllFileKeys($path);
+
        /**
         * delete system-wide encryption keys not related to a specific user,
         * e.g something like a key for public link shares