From 2522330da536b5b819f9aeb1232b5db3d4b1051a Mon Sep 17 00:00:00 2001 From: Julius Knorr Date: Thu, 5 Dec 2024 14:17:03 +0100 Subject: [PATCH] fix: Use proper user when unlocking an app locked file with occ Signed-off-by: Julius Knorr --- lib/Service/LockService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Service/LockService.php b/lib/Service/LockService.php index 714ee9a0..37aa17ae 100644 --- a/lib/Service/LockService.php +++ b/lib/Service/LockService.php @@ -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(); }