Skip to content

Commit

Permalink
Merge pull request #254 from nextcloud/backport/252/stable27
Browse files Browse the repository at this point in the history
[stable27] fix: Allow to unlock based on the current lock not the requested one to allow lock owners to unlock in any case
  • Loading branch information
juliusknorr authored Mar 21, 2024
2 parents 28b0b58 + 66e3aa2 commit e921096
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Service/LockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,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;
}
Expand Down

0 comments on commit e921096

Please sign in to comment.