diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2020-01-02 11:33:27 -0100 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2020-01-02 11:34:20 -0100 |
commit | 441b81a3af61078da7ce51cdd195c5c47111998c (patch) | |
tree | 7104d628b326e474ff9db2772ed03935d1fecaae | |
parent | 768de086ea7d4aa26dd225c8f17420172adf569c (diff) | |
download | nextcloud-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.php | 4 |
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) { |