diff --git a/apps/files_sharing/lib/Listener/GlobalShareAcceptanceListener.php b/apps/files_sharing/lib/Listener/GlobalShareAcceptanceListener.php index ab194a7a5db71..d30801a8fd418 100644 --- a/apps/files_sharing/lib/Listener/GlobalShareAcceptanceListener.php +++ b/apps/files_sharing/lib/Listener/GlobalShareAcceptanceListener.php @@ -50,8 +50,11 @@ public function handle(Event $event): void { if ($this->config->getSystemValueBool('sharing.interal_shares_accepted', false)) { $share = $event->getShare(); - $share->setStatus(IShare::STATUS_ACCEPTED); - $this->shareManager->updateShare($share); + + if ($share->getShareType() === IShare::TYPE_USER || $share->getShareType() === IShare::TYPE_GROUP) { + $share->setStatus(IShare::STATUS_ACCEPTED); + $this->shareManager->updateShare($share); + } } }