summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2020-01-02 11:33:27 -0100
committerMaxence Lange <maxence@artificial-owl.com>2020-01-02 11:34:20 -0100
commit441b81a3af61078da7ce51cdd195c5c47111998c (patch)
tree7104d628b326e474ff9db2772ed03935d1fecaae
parent768de086ea7d4aa26dd225c8f17420172adf569c (diff)
downloadnextcloud-server-441b81a3af61078da7ce51cdd195c5c47111998c.tar.gz
nextcloud-server-441b81a3af61078da7ce51cdd195c5c47111998c.zip
confirm resharing rights if viewer is current owner
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
-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 d5c14a1daf1..906eb82221b 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -1462,6 +1462,10 @@ class ShareAPIController extends OCSController {
* @return bool
*/
private function hasResharingRights($viewer, $node): bool {
+ if ($viewer === $node->getOwner()->getUID()) {
+ return true;
+ }
+
foreach ([$node, $node->getParent()] as $node) {
$shares = $this->getSharesFromNode($viewer, $node, true);
foreach ($shares as $share) {