A valid user session is required for circles.

The circles app depends on a valid userId. A public shared calender might be viewed by guests without a user session. For such requests the principal is null.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
Daniel Kesselberg 2020-10-23 21:18:02 +02:00 committed by backportbot[bot]
parent 761ee14fd7
commit 6635dbb3bd
1 changed files with 3 additions and 1 deletions

View File

@ -178,7 +178,9 @@ class Principal implements BackendInterface {
return $this->userToPrincipal($user); return $this->userToPrincipal($user);
} }
} elseif ($prefix === 'principals/circles') { } elseif ($prefix === 'principals/circles') {
return $this->circleToPrincipal($name); if ($this->userSession->getUser() !== null) {
return $this->circleToPrincipal($name);
}
} }
return null; return null;
} }