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 authored and backportbot[bot] committed Jan 17, 2025
1 parent f4ba8fb commit c266649
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/Mount/GroupFolderStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,16 @@ public function getFolderId(): int {
* @psalm-suppress FalsableReturnStatement Return type of getOwner is not clear even in server
*/
public function getOwner($path) {
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;
}

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

0 comments on commit c266649

Please sign in to comment.