Skip to content

Commit 3612926

Browse files
committed
fix: Prefer mount owner over current user as owner of the storage
Signed-off-by: Julius Knorr <[email protected]>
1 parent dcd198e commit 3612926

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/Mount/GroupFolderStorage.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,16 @@ public function getFolderId(): int {
3939
}
4040

4141
public function getOwner(string $path): string|false {
42+
if ($this->mountOwner !== null) {
43+
return $this->mountOwner->getUID();
44+
}
45+
4246
$user = $this->userSession->getUser();
4347
if ($user !== null) {
4448
return $user->getUID();
4549
}
4650

47-
return $this->mountOwner !== null ? $this->mountOwner->getUID() : false;
51+
return false;
4852
}
4953

5054
/**

0 commit comments

Comments
 (0)