Skip to content

Commit c266649

Browse files
juliusknorrbackportbot[bot]
authored andcommitted
fix: Prefer mount owner over current user as owner of the storage
Signed-off-by: Julius Knorr <[email protected]>
1 parent f4ba8fb commit c266649

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/Mount/GroupFolderStorage.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,16 @@ public function getFolderId(): int {
5454
* @psalm-suppress FalsableReturnStatement Return type of getOwner is not clear even in server
5555
*/
5656
public function getOwner($path) {
57+
if ($this->mountOwner !== null) {
58+
return $this->mountOwner->getUID();
59+
}
60+
5761
$user = $this->userSession->getUser();
5862
if ($user !== null) {
5963
return $user->getUID();
6064
}
61-
return $this->mountOwner !== null ? $this->mountOwner->getUID() : false;
65+
66+
return false;
6267
}
6368

6469
public function getCache($path = '', $storage = null) {

0 commit comments

Comments
 (0)