aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/lib
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-05-13 17:40:57 +0200
committerBjörn Schießle <schiessle@owncloud.com>2013-05-13 17:40:57 +0200
commitaa3eb6bb5be9979c31f402201241cf127573541e (patch)
tree3855741daa59adf89061aea68c75b749c54c91eb /apps/files_encryption/lib
parent517efdf952526ce0f0a03107874baca18742c49b (diff)
downloadnextcloud-server-aa3eb6bb5be9979c31f402201241cf127573541e.tar.gz
nextcloud-server-aa3eb6bb5be9979c31f402201241cf127573541e.zip
don't handle public share keys in lib/public/share.php but in apps/files_encryption/lib/util.php instead
Diffstat (limited to 'apps/files_encryption/lib')
-rw-r--r--apps/files_encryption/lib/util.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php
index 732f5fece85..2a64680599f 100644
--- a/apps/files_encryption/lib/util.php
+++ b/apps/files_encryption/lib/util.php
@@ -109,6 +109,7 @@ class Util {
private $publicKeyPath; // Path to user's public key
private $privateKeyPath; // Path to user's private key
private $publicShareKeyId;
+ private $recoveryKeyId;
public function __construct( \OC_FilesystemView $view, $userId, $client = false ) {
@@ -125,6 +126,7 @@ class Util {
$this->publicKeyPath = $this->publicKeyDir . '/' . $this->userId . '.public.key'; // e.g. data/public-keys/admin.public.key
$this->privateKeyPath = $this->encryptionDir . '/' . $this->userId . '.private.key'; // e.g. data/admin/admin.private.key
$this->publicShareKeyId = \OC_Appconfig::getValue('files_encryption', 'publicShareKeyId');
+ $this->recoveryKeyId = \OC_Appconfig::getValue('files_encryption', 'recoveryKeyId');
}
public function ready() {
@@ -798,6 +800,7 @@ class Util {
// public system user 'ownCloud' (for public shares)
if (
$user == $this->publicShareKeyId
+ or $user == $this->recoveryKeyId
or $util->ready()
) {
@@ -949,7 +952,11 @@ class Util {
if ( $sharingEnabled ) {
// Find out who, if anyone, is sharing the file
- $userIds = \OCP\Share::getUsersSharingFile( $ownerPath, $owner,true, true, true );
+ $result = \OCP\Share::getUsersSharingFile( $ownerPath, $owner,true, true, true );
+ $userIds = $result['users'];
+ if ( $result['public'] ) {
+ $userIds[] = $this->publicShareKeyId;
+ }
}