diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-07-04 12:06:23 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-07-04 12:19:59 +0200 |
commit | 673b0f5eb93492067a1e8560792d7a3509baa309 (patch) | |
tree | dc413dfa91fde51ea3b5c8e2ad5bde81d9906cce /apps/files_encryption/hooks | |
parent | e9f573086915f6d0b86e5c57e1a2b627589f1fb6 (diff) | |
download | nextcloud-server-673b0f5eb93492067a1e8560792d7a3509baa309.tar.gz nextcloud-server-673b0f5eb93492067a1e8560792d7a3509baa309.zip |
add owner as parameter for delShareKey
Diffstat (limited to 'apps/files_encryption/hooks')
-rw-r--r-- | apps/files_encryption/hooks/hooks.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index 7303cd080e5..d4a98410a37 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -340,7 +340,7 @@ class Hooks { }
/**
- * @brief
+ * unshare file/folder from a user with whom you shared the file before
*/
public static function postUnshare($params) {
@@ -385,8 +385,10 @@ class Hooks { // Unshare every user who no longer has access to the file
$delUsers = array_diff($userIds, $sharingUsers);
+ list($owner, $ownerPath) = $util->getUidAndFilename($path);
+
// delete share key
- Keymanager::delShareKey($view, $delUsers, $path);
+ Keymanager::delShareKey($view, $delUsers, $ownerPath, $owner);
}
}
@@ -595,6 +597,7 @@ class Hooks { }
/**
+ * unmount file from yourself
* remember files/folders which get unmounted
*/
public static function preUmount($params) {
@@ -613,6 +616,9 @@ class Hooks { 'itemType' => $itemType);
}
+ /**
+ * unmount file from yourself
+ */
public static function postUmount($params) {
if (!isset(self::$umountedFiles[$params[\OC\Files\Filesystem::signal_param_path]])) {
@@ -642,7 +648,7 @@ class Hooks { // check if the user still has access to the file, otherwise delete share key
$sharingUsers = \OCP\Share::getUsersSharingFile($path, $user);
if (!in_array(\OCP\User::getUser(), $sharingUsers['users'])) {
- Keymanager::delShareKey($view, array(\OCP\User::getUser()), $path);
+ Keymanager::delShareKey($view, array(\OCP\User::getUser()), $path, $user);
}
}
}
|