aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/encryption/update.php
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-03-31 16:23:31 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-07 13:30:29 +0200
commite4895bda01f9c94fc33e094ae9466e1cf5502916 (patch)
treef78a79ef0c3035d443fc10e2eaedcb4f436d7091 /lib/private/encryption/update.php
parentbd933b1c85dff950e83591a6245ba2e15db33caf (diff)
downloadnextcloud-server-e4895bda01f9c94fc33e094ae9466e1cf5502916.tar.gz
nextcloud-server-e4895bda01f9c94fc33e094ae9466e1cf5502916.zip
add helper class accessible for encryption modules to ask for a list of users with access to a file, needed to apply the recovery key to all files
Diffstat (limited to 'lib/private/encryption/update.php')
-rw-r--r--lib/private/encryption/update.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/encryption/update.php b/lib/private/encryption/update.php
index 06dc330151e..21cedde6140 100644
--- a/lib/private/encryption/update.php
+++ b/lib/private/encryption/update.php
@@ -46,12 +46,16 @@ class Update {
/** @var string */
protected $uid;
+ /** @var \OC\Encryption\File */
+ protected $file;
+
/**
*
* @param \OC\Files\View $view
* @param \OC\Encryption\Util $util
* @param \OC\Files\Mount\Manager $mountManager
* @param \OC\Encryption\Manager $encryptionManager
+ * @param \OC\Encryption\File $file
* @param string $uid
*/
public function __construct(
@@ -59,6 +63,7 @@ class Update {
Util $util,
Mount\Manager $mountManager,
Manager $encryptionManager,
+ File $file,
$uid
) {
@@ -66,6 +71,7 @@ class Update {
$this->util = $util;
$this->mountManager = $mountManager;
$this->encryptionManager = $encryptionManager;
+ $this->file = $file;
$this->uid = $uid;
}
@@ -103,7 +109,7 @@ class Update {
$encryptionModule = $this->encryptionManager->getDefaultEncryptionModule();
foreach ($allFiles as $path) {
- $usersSharing = $this->util->getSharingUsersArray($path);
+ $usersSharing = $this->file->getAccessList($path);
$encryptionModule->update($absPath, $this->uid, $usersSharing);
}
}