summaryrefslogtreecommitdiffstats
path: root/lib/public/Share
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-03-27 16:06:31 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-04-13 12:58:50 +0200
commit91e650791de6dbb320e5163f626c754d42e0bc35 (patch)
treeb6860a90d3b22bfd715cd7ba444673ae72bebfc0 /lib/public/Share
parent0c2dc3bc8cdca46afc2bc08da4a985610093f2af (diff)
downloadnextcloud-server-91e650791de6dbb320e5163f626c754d42e0bc35.tar.gz
nextcloud-server-91e650791de6dbb320e5163f626c754d42e0bc35.zip
Return the paths for the users without setting them all up
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/public/Share')
-rw-r--r--lib/public/Share/IManager.php5
-rw-r--r--lib/public/Share/IShareHelper.php7
-rw-r--r--lib/public/Share/IShareProvider.php7
3 files changed, 9 insertions, 10 deletions
diff --git a/lib/public/Share/IManager.php b/lib/public/Share/IManager.php
index 26c3f2b42e6..1cbb27cb618 100644
--- a/lib/public/Share/IManager.php
+++ b/lib/public/Share/IManager.php
@@ -207,9 +207,10 @@ interface IManager {
*
* Then the access list will to '/folder1/folder2/fileA' is:
* [
- * users => ['user1', 'user2', 'user4'],
+ * users => ['user1' => ['node_id' => 42, 'node_path' => '/path'], 'user2' => [...]],
+ * remote => ['user1' => ['node_id' => 42, 'node_path' => '/path'], 'user2' => [...]],
* public => bool
- * remote => bool
+ * mail => bool
* ]
*
* This is required for encryption/activity
diff --git a/lib/public/Share/IShareHelper.php b/lib/public/Share/IShareHelper.php
index 5e99f86832d..01202cf477b 100644
--- a/lib/public/Share/IShareHelper.php
+++ b/lib/public/Share/IShareHelper.php
@@ -33,12 +33,9 @@ use OCP\Files\Node;
interface IShareHelper {
/**
- * If a user has access to a file
- *
* @param Node $node
- * @param array $users Array of userIds
- * @return array Mapping $uid to an array of nodes
+ * @return array [ users => [Mapping $uid => $path], remotes => [Mapping $cloudId => $path]]
* @since 12
*/
- public function getPathsForAccessList(Node $node, $users);
+ public function getPathsForAccessList(Node $node);
}
diff --git a/lib/public/Share/IShareProvider.php b/lib/public/Share/IShareProvider.php
index 2533e81abf2..fba432f31e7 100644
--- a/lib/public/Share/IShareProvider.php
+++ b/lib/public/Share/IShareProvider.php
@@ -196,14 +196,15 @@ interface IShareProvider {
* Return will look like:
*
* [
- * users => ['user1', 'user2', 'user4'],
+ * users => ['user1' => ['node_id' => 42, 'node_path' => '/path'], 'user2' => [...]],
+ * remote => ['user1' => ['node_id' => 42, 'node_path' => '/path'], 'user2' => [...]],
+ * mail => bool
* public => bool
- * remote => bool
* ]
*
* @param Node[] $nodes The list of nodes to get access for
* @param bool $currentAccess If current access is required (like for removed shares that might get revived later)
- * @return string[]
+ * @return array
* @since 12
*/
public function getAccessList($nodes, $currentAccess);