From fb52b1af67320e221fc66c13b32f98e5d5438229 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 29 Aug 2016 11:21:44 +0200 Subject: Allow increasing permissions for share owner In some cases, the owner of the share is also recipient through a group share. The owner must still be able to increase permissions in that situation. --- apps/files_sharing/lib/API/Share20OCS.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/files_sharing/lib/API') diff --git a/apps/files_sharing/lib/API/Share20OCS.php b/apps/files_sharing/lib/API/Share20OCS.php index 62a947ee2c9..34f73c7ac07 100644 --- a/apps/files_sharing/lib/API/Share20OCS.php +++ b/apps/files_sharing/lib/API/Share20OCS.php @@ -661,7 +661,7 @@ class Share20OCS extends OCSController { } } - if ($permissions !== null) { + if ($permissions !== null && $share->getShareOwner() !== $this->currentUser->getUID()) { /* Check if this is an incomming share */ $incomingShares = $this->shareManager->getSharedWith($this->currentUser->getUID(), \OCP\Share::SHARE_TYPE_USER, $share->getNode(), -1, 0); $incomingShares = array_merge($incomingShares, $this->shareManager->getSharedWith($this->currentUser->getUID(), \OCP\Share::SHARE_TYPE_GROUP, $share->getNode(), -1, 0)); -- cgit v1.2.3