fix: Use passed userid when getting attachment folder

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2023-02-27 22:56:28 +01:00
committed by backportbot-nextcloud[bot]
parent 090378580c
commit 85e7305d8d

View File

@@ -193,7 +193,7 @@ class ConfigService {
}
public function getAttachmentFolder(string $userId = null): string {
if ($this->getUserId() === null) {
if ($userId === null && $this->getUserId() === null) {
throw new NoPermissionException('Must be logged in get the attachment folder');
}