Skip to content

Commit

Permalink
Merge pull request #3538 from nextcloud/fix/storage-owner
Browse files Browse the repository at this point in the history
fix: Prefer mount owner over current user as owner of the storage
  • Loading branch information
juliusknorr authored Jan 16, 2025
2 parents df42703 + 3612926 commit 2b97330
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 2b97330

Please sign in to comment.