Skip to content

Commit

Permalink
fix(share): Add owner sharing permission for folder of public share
Browse files Browse the repository at this point in the history
Fixes: #1530

Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Oct 23, 2024
1 parent 5661614 commit 79021e9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Db/Collective.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,11 @@ public function setUserShowRecentPages(bool $userShowRecentPages): void {
}

public function getUserPermissions(bool $isShare = false): int {
// Public shares always get permissions of a simple member

// Public shares always get permissions of a simple member plus sharing permission of owner
if ($isShare) {
return $this->getMemberPermissions();
$sharePermissions = $this->canShare() ? Constants::PERMISSION_SHARE : 0;
return $this->getMemberPermissions() | $sharePermissions;
}

if ($this->level === Member::LEVEL_OWNER || $this->level === Member::LEVEL_ADMIN) {
Expand Down

0 comments on commit 79021e9

Please sign in to comment.