mirror of
https://github.com/nextcloud/server.git
synced 2026-07-15 13:01:34 -04:00
confirm resharing rights if viewer is current owner (#18630)
confirm resharing rights if viewer is current owner
This commit is contained in:
commit
a08e69a005
1 changed files with 4 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue