From 79021e9322d7bb9c322542eafc2f7e8fde0d1332 Mon Sep 17 00:00:00 2001 From: Jonas Date: Wed, 23 Oct 2024 16:23:38 +0200 Subject: [PATCH] fix(share): Add owner sharing permission for folder of public share Fixes: #1530 Signed-off-by: Jonas --- lib/Db/Collective.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Db/Collective.php b/lib/Db/Collective.php index fb50a1812..25f412b12 100644 --- a/lib/Db/Collective.php +++ b/lib/Db/Collective.php @@ -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) {