Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-10-24 16:51:56 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2019-10-29 15:20:08 +0300
commit2fd057513a4eafd1282128721fb6dbc443ffdeba (patch)
tree326066a72eb89e7d820baf96ad03dcb2e29ab5e5 /apps/files_sharing/lib/Controller/ShareAPIController.php
parent3331cdd74abb89692c9d37ba503a9d36768ae7d9 (diff)
Fix current user edit/delete permissions
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_sharing/lib/Controller/ShareAPIController.php')
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php
index e44ca84a09f..66b2383ea7d 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -154,7 +154,11 @@ class ShareAPIController extends OCSController {
'share_type' => $share->getShareType(),
'uid_owner' => $share->getSharedBy(),
'displayname_owner' => $sharedBy !== null ? $sharedBy->getDisplayName() : $share->getSharedBy(),
+ // recipient permissions
'permissions' => $share->getPermissions(),
+ // current user permissions on this share
+ 'can_edit' => $this->canEditShare($share),
+ 'can_delete' => $this->canDeleteShare($share),
'stime' => $share->getShareTime()->getTimestamp(),
'parent' => null,
'expiration' => null,