diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-03-31 16:23:31 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-07 13:30:29 +0200 |
commit | e4895bda01f9c94fc33e094ae9466e1cf5502916 (patch) | |
tree | f78a79ef0c3035d443fc10e2eaedcb4f436d7091 /lib/private/files/stream | |
parent | bd933b1c85dff950e83591a6245ba2e15db33caf (diff) | |
download | nextcloud-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/files/stream')
-rw-r--r-- | lib/private/files/stream/encryption.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/private/files/stream/encryption.php b/lib/private/files/stream/encryption.php index e3927edff2c..a96d573723c 100644 --- a/lib/private/files/stream/encryption.php +++ b/lib/private/files/stream/encryption.php @@ -31,6 +31,9 @@ class Encryption extends Wrapper { /** @var \OC\Encryption\Util */ protected $util; + /** @var \OC\Encryption\File */ + protected $file; + /** @var \OCP\Encryption\IEncryptionModule */ protected $encryptionModule; @@ -97,6 +100,7 @@ class Encryption extends Wrapper { 'encryptionModule', 'header', 'uid', + 'file', 'util', 'size', 'unencryptedSize', @@ -117,6 +121,7 @@ class Encryption extends Wrapper { * @param \OC\Files\Storage\Storage $storage * @param \OC\Files\Storage\Wrapper\Encryption $encStorage * @param \OC\Encryption\Util $util + * @param \OC\Encryption\File $file * @param string $mode * @param int $size * @param int $unencryptedSize @@ -130,6 +135,7 @@ class Encryption extends Wrapper { \OC\Files\Storage\Storage $storage, \OC\Files\Storage\Wrapper\Encryption $encStorage, \OC\Encryption\Util $util, + \OC\Encryption\File $file, $mode, $size, $unencryptedSize) { @@ -144,6 +150,7 @@ class Encryption extends Wrapper { 'header' => $header, 'uid' => $uid, 'util' => $util, + 'file' => $file, 'size' => $size, 'unencryptedSize' => $unencryptedSize, 'encryptionStorage' => $encStorage @@ -229,7 +236,7 @@ class Encryption extends Wrapper { $sharePath = dirname($path); } - $accessList = $this->util->getSharingUsersArray($sharePath); + $accessList = $this->file->getAccessList($sharePath); $this->newHeader = $this->encryptionModule->begin($this->fullPath, $this->uid, $this->header, $accessList); return true; |