confirm resharing rights if viewer is current owner

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
This commit is contained in:
Maxence Lange 2020-01-02 11:33:27 -01:00
parent 768de086ea
commit 441b81a3af
1 changed files with 4 additions and 0 deletions

View File

@ -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) {