Skip to content

Commit

Permalink
Merge pull request #466 from nextcloud/backport/452/stable29
Browse files Browse the repository at this point in the history
[stable29] fix: Use proper user when unlocking an app locked file with occ
  • Loading branch information
juliusknorr authored Dec 27, 2024
2 parents 96c6add + cb8fcca commit 47676e0
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 47676e0

Please sign in to comment.