summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-04-11 12:40:36 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-04-13 12:58:52 +0200
commit629b7c0fc38d9a2c33805bfcf4359e263e4ae68f (patch)
tree915d48dcfbc021fad3cbff2a5c53e7de006e630e /lib/public
parent6c23a5fa3511e5212c83e8407fa18b12ec975f97 (diff)
downloadnextcloud-server-629b7c0fc38d9a2c33805bfcf4359e263e4ae68f.tar.gz
nextcloud-server-629b7c0fc38d9a2c33805bfcf4359e263e4ae68f.zip
Adjust docs and make !$currentAccess simpler
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/Share/IManager.php31
-rw-r--r--lib/public/Share/IShareProvider.php10
2 files changed, 25 insertions, 16 deletions
diff --git a/lib/public/Share/IManager.php b/lib/public/Share/IManager.php
index 5f02e1d9804..31f04803066 100644
--- a/lib/public/Share/IManager.php
+++ b/lib/public/Share/IManager.php
@@ -197,18 +197,33 @@ interface IManager {
*
* Consider:
* -root
- * |-folder1
- * |-folder2
- * |-fileA
+ * |-folder1 (23)
+ * |-folder2 (32)
+ * |-fileA (42)
*
- * fileA is shared with user1
+ * fileA is shared with user1 and user1@server1
* folder2 is shared with group2 (user4 is a member of group2)
- * folder1 is shared with user2
+ * folder1 is shared with user2 (renamed to "folder (1)") and user2@server2
*
- * Then the access list will to '/folder1/folder2/fileA' is:
+ * Then the access list to '/folder1/folder2/fileA' with $currentAccess is:
* [
- * users => ['user1' => ['node_id' => 42, 'node_path' => '/path'], 'user2' => [...]],
- * remote => ['user1' => ['node_id' => 42, 'token' => 'ShareToken'], 'user2' => [...]],
+ * users => [
+ * 'user1' => ['node_id' => 42, 'node_path' => '/fileA'],
+ * 'user4' => ['node_id' => 32, 'node_path' => '/folder2'],
+ * 'user2' => ['node_id' => 23, 'node_path' => '/folder (1)'],
+ * ],
+ * remote => [
+ * 'user1@server1' => ['node_id' => 42, 'token' => 'SeCr3t'],
+ * 'user2@server2' => ['node_id' => 23, 'token' => 'FooBaR'],
+ * ],
+ * public => bool
+ * mail => bool
+ * ]
+ *
+ * The access list to '/folder1/folder2/fileA' **without** $currentAccess is:
+ * [
+ * users => ['user1', 'user2', 'user4'],
+ * remote => bool,
* public => bool
* mail => bool
* ]
diff --git a/lib/public/Share/IShareProvider.php b/lib/public/Share/IShareProvider.php
index bac1a5d87f0..31808206cf6 100644
--- a/lib/public/Share/IShareProvider.php
+++ b/lib/public/Share/IShareProvider.php
@@ -193,14 +193,8 @@ interface IShareProvider {
/**
* Get the access list to the array of provided nodes.
- * Return will look like:
- *
- * [
- * users => ['user1' => ['node_id' => 42, 'node_path' => '/path'], 'user2' => [...]],
- * remote => ['user1' => ['node_id' => 42, 'token' => 'ShareToken'], 'user2' => [...]],
- * mail => bool
- * public => bool
- * ]
+ *
+ * @see IManager::getAccessList() for sample docs
*
* @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)