Skip to content

Commit 69990af

Browse files
authored
Merge pull request #252 from nextcloud/fix/unlock-client-lock
fix: Allow to unlock based on the current lock not the requested one to allow lock owners to unlock in any case
2 parents 4704039 + 85e5b80 commit 69990af

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
@@ -231,7 +231,7 @@ public function canUnlock(LockContext $request, FileLock $current): void {
231231
$isSameType = $request->getType() === $current->getType();
232232

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

0 commit comments

Comments
 (0)