Skip to content

Commit

Permalink
fix: Prefer mount owner over current user as owner of the storage
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Knorr <[email protected]>
  • Loading branch information
juliusknorr committed Jan 16, 2025
1 parent dcd198e commit 3612926
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Mount/GroupFolderStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,16 @@ public function getFolderId(): int {
}

public function getOwner(string $path): string|false {
if ($this->mountOwner !== null) {
return $this->mountOwner->getUID();
}

$user = $this->userSession->getUser();
if ($user !== null) {
return $user->getUID();
}

return $this->mountOwner !== null ? $this->mountOwner->getUID() : false;
return false;
}

/**
Expand Down

0 comments on commit 3612926

Please sign in to comment.