Merge pull request #24446 from nextcloud/backport/23652/stable20

[stable20] Fix public calendars shared to circles
This commit is contained in:
Morris Jobke 2020-11-30 11:24:38 +01:00 committed by GitHub
commit 6916240d98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 6 deletions

View File

@ -178,10 +178,8 @@ class Principal implements BackendInterface {
return $this->userToPrincipal($user); return $this->userToPrincipal($user);
} }
} elseif ($prefix === 'principals/circles') { } elseif ($prefix === 'principals/circles') {
try { if ($this->userSession->getUser() !== null) {
return $this->circleToPrincipal($name); return $this->circleToPrincipal($name);
} catch (QueryException $e) {
return null;
} }
} }
return null; return null;
@ -471,9 +469,6 @@ class Principal implements BackendInterface {
/** /**
* @param string $circleUniqueId * @param string $circleUniqueId
* @return array|null * @return array|null
* @throws \OCP\AppFramework\QueryException
* @suppress PhanUndeclaredClassMethod
* @suppress PhanUndeclaredClassCatch
*/ */
protected function circleToPrincipal($circleUniqueId) { protected function circleToPrincipal($circleUniqueId) {
if (!$this->appManager->isEnabledForUser('circles') || !class_exists('\OCA\Circles\Api\v1\Circles')) { if (!$this->appManager->isEnabledForUser('circles') || !class_exists('\OCA\Circles\Api\v1\Circles')) {