summaryrefslogtreecommitdiffstats
path: root/lib/public
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/public
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/public')
-rw-r--r--lib/public/encryption/ifile.php36
-rw-r--r--lib/public/encryption/imanager.php4
-rw-r--r--lib/public/iservercontainer.php5
3 files changed, 42 insertions, 3 deletions
diff --git a/lib/public/encryption/ifile.php b/lib/public/encryption/ifile.php
new file mode 100644
index 00000000000..cb4faea0625
--- /dev/null
+++ b/lib/public/encryption/ifile.php
@@ -0,0 +1,36 @@
+<?php
+
+/**
+ * ownCloud
+ *
+ * @copyright (C) 2015 ownCloud, Inc.
+ *
+ * @author Bjoern Schiessle <schiessle@owncloud.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+namespace OCP\Encryption;
+
+interface IFile {
+
+ /**
+ * get list of users with access to the file
+ *
+ * @param $path to the file
+ * @return array
+ */
+ public function getAccessList($path);
+
+} \ No newline at end of file
diff --git a/lib/public/encryption/imanager.php b/lib/public/encryption/imanager.php
index 9a12e401593..2691604ac37 100644
--- a/lib/public/encryption/imanager.php
+++ b/lib/public/encryption/imanager.php
@@ -22,9 +22,7 @@
*/
namespace OCP\Encryption;
-//
-// TODO: move exceptions to OCP
-//
+
use OC\Encryption\Exceptions\ModuleDoesNotExistsException;
use OC\Encryption\Exceptions\ModuleAlreadyExistsException;
diff --git a/lib/public/iservercontainer.php b/lib/public/iservercontainer.php
index 9e36bc31bed..509e5894d47 100644
--- a/lib/public/iservercontainer.php
+++ b/lib/public/iservercontainer.php
@@ -184,6 +184,11 @@ interface IServerContainer {
function getEncryptionManager();
/**
+ * @return \OC\Encryption\File
+ */
+ function getEncryptionFilesHelper();
+
+ /**
* @param string $encryptionModuleId encryption module ID
*
* @return \OCP\Encryption\Keys\IStorage