Skip to content

Commit

Permalink
Merge pull request #467 from nextcloud/backport/452/stable28
Browse files Browse the repository at this point in the history
[stable28] fix: Use proper user when unlocking an app locked file with occ
  • Loading branch information
juliusknorr authored Dec 20, 2024
2 parents 02308e5 + 2522330 commit 808cea1
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 @@ -281,7 +281,7 @@ public function unlockFile(int $fileId, string $userId, bool $force = false, int
}

if ($force) {
$userId = $lock->getOwner();
$userId = in_array($lock->getType(), [ILock::TYPE_USER, ILock::TYPE_TOKEN]) ? $lock->getOwner() : $userId;
$lockType = $lock->getType();
}

Expand Down

0 comments on commit 808cea1

Please sign in to comment.