diff --git a/lib/Service/LockService.php b/lib/Service/LockService.php index 2fec3a6a..49e0315b 100644 --- a/lib/Service/LockService.php +++ b/lib/Service/LockService.php @@ -245,7 +245,12 @@ public function canUnlock(LockContext $request, FileLock $current): void { return; } - if ($request->getType() === ILock::TYPE_USER && $request->getNode()->getOwner()->getUID() === $this->userId) { + // we need to ignore some filesystem that return current user as file owner + $ignoreFileOwnership = ['OCA\GroupFolders\Mount\MountProvider']; + if ($request->getType() === ILock::TYPE_USER + && $request->getNode()->getOwner()->getUID() === $this->userId + && !in_array($request->getNode()->getMountPoint()->getMountProvider(), $ignoreFileOwnership) + ) { return; }