Skip to content

Commit

Permalink
fix: Consider owner group membership for public share links
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliushaertl authored and backportbot-nextcloud[bot] committed Dec 22, 2023
1 parent cab3da3 commit dd89e2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/TokenManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ public function generateWopiToken(string $fileId, ?string $shareToken = null, ?s
throw new ShareNotFound();
}

$owneruid = $share->getShareOwner();
$updatable = (bool)($share->getPermissions() & \OCP\Constants::PERMISSION_UPDATE);
$updatable = $updatable && $this->permissionManager->userCanEdit($owneruid);
$hideDownload = $share->getHideDownload();
$owneruid = $share->getShareOwner();
$rootFolder = $this->rootFolder->getUserFolder($owneruid);

} elseif ($this->userId !== null) {
try {
$editoruid = $this->userId;
Expand Down

0 comments on commit dd89e2b

Please sign in to comment.