From 1a4af87dee9647e6d7b009195361f96027f3fe23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 14 Mar 2024 18:27:14 +0100 Subject: [PATCH] fix: Allow to unlock based on the current lock not the requested one to allow lock owners to unlock in any case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Service/LockService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Service/LockService.php b/lib/Service/LockService.php index 37f6cee4..9b657b96 100644 --- a/lib/Service/LockService.php +++ b/lib/Service/LockService.php @@ -231,7 +231,7 @@ public function canUnlock(LockContext $request, FileLock $current): void { $isSameType = $request->getType() === $current->getType(); // Check the token for token based locks - if ($request->getType() === ILock::TYPE_TOKEN) { + if ($current->getType() === ILock::TYPE_TOKEN) { if ($isSameToken || ($this->allowUserOverride && $isSameUser)) { return; }