Skip to content

Commit

Permalink
Merge pull request #452 from nextcloud/fix/451
Browse files Browse the repository at this point in the history
fix: Use proper user when unlocking an app locked file with occ
  • Loading branch information
juliusknorr authored Dec 16, 2024
2 parents 5edf4af + 2eca9cc commit 0ac9f42
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 @@ -259,7 +259,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 0ac9f42

Please sign in to comment.