Skip to content

Commit

Permalink
ignore owner condition in groupfolders
Browse files Browse the repository at this point in the history
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
  • Loading branch information
ArtificialOwl committed Sep 28, 2023
1 parent 7b1827a commit 96ed6ef
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/Service/LockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 96ed6ef

Please sign in to comment.