Skip to content

Commit 66e3aa2

Browse files
juliusknorrbackportbot[bot]
authored andcommitted
fix: Allow to unlock based on the current lock not the requested one to allow lock owners to unlock in any case
Signed-off-by: Julius Härtl <[email protected]>
1 parent 1e56fcf commit 66e3aa2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Service/LockService.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public function canUnlock(LockContext $request, FileLock $current): void {
233233
$isSameType = $request->getType() === $current->getType();
234234

235235
// Check the token for token based locks
236-
if ($request->getType() === ILock::TYPE_TOKEN) {
236+
if ($current->getType() === ILock::TYPE_TOKEN) {
237237
if ($isSameToken || ($this->allowUserOverride && $isSameUser)) {
238238
return;
239239
}

0 commit comments

Comments
 (0)