summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-11-30 11:33:21 +0100
committerGitHub <noreply@github.com>2020-11-30 11:33:21 +0100
commit0cc0d826a8cf47b978f693224fd84e361beb2b69 (patch)
tree5a12156174c2412d45190f6f7d70b44fa242517d
parent7bc8135013325dd559fec9b46e118f74b34b77c4 (diff)
parent23263f9490d718ee200d0ce8ab5a51b8fc0678ce (diff)
downloadnextcloud-server-0cc0d826a8cf47b978f693224fd84e361beb2b69.tar.gz
nextcloud-server-0cc0d826a8cf47b978f693224fd84e361beb2b69.zip
Merge pull request #24447 from nextcloud/backport/23652/stable19
[stable19] Fix public calendars shared to circles
-rw-r--r--apps/dav/lib/Connector/Sabre/Principal.php7
1 files changed, 1 insertions, 6 deletions
diff --git a/apps/dav/lib/Connector/Sabre/Principal.php b/apps/dav/lib/Connector/Sabre/Principal.php
index 1ddbc1a6083..5dedb0a7d7b 100644
--- a/apps/dav/lib/Connector/Sabre/Principal.php
+++ b/apps/dav/lib/Connector/Sabre/Principal.php
@@ -178,10 +178,8 @@ class Principal implements BackendInterface {
return $this->userToPrincipal($user);
}
} elseif ($prefix === 'principals/circles') {
- try {
+ if ($this->userSession->getUser() !== null) {
return $this->circleToPrincipal($name);
- } catch (QueryException $e) {
- return null;
}
}
return null;
@@ -471,9 +469,6 @@ class Principal implements BackendInterface {
/**
* @param string $circleUniqueId
* @return array|null
- * @throws \OCP\AppFramework\QueryException
- * @suppress PhanUndeclaredClassMethod
- * @suppress PhanUndeclaredClassCatch
*/
protected function circleToPrincipal($circleUniqueId) {
if (!$this->appManager->isEnabledForUser('circles') || !class_exists('\OCA\Circles\Api\v1\Circles')) {