diff --git a/lib/Model/Circle.php b/lib/Model/Circle.php index 6ab9ee98d..9a56e2693 100644 --- a/lib/Model/Circle.php +++ b/lib/Model/Circle.php @@ -150,6 +150,7 @@ class Circle extends ManagedModel implements IEntity, IDeserializable, INC22Quer 4 => 'Email Address', 8 => 'Contact', 16 => 'Circle', + 10000 => 'Nextcloud App', 10001 => 'Circles App', 10002 => 'Admin Command Line' ]; @@ -555,9 +556,7 @@ public function getMemberships(): array { * @throws RequestBuilderException */ public function getLink(string $singleId, bool $detailed = false): Membership { - $this->getManager()->getLink($this, $singleId, $detailed); - - throw new MembershipNotFoundException(); + return $this->getManager()->getLink($this, $singleId, $detailed); } @@ -631,6 +630,15 @@ public function getInstance(): string { } + /** + * @return bool + * @throws OwnerNotFoundException + */ + public function isLocal(): bool { + return $this->getManager()->isLocalInstance($this->getInstance()); + } + + /** * @param int $population * diff --git a/lib/Service/FederatedUserService.php b/lib/Service/FederatedUserService.php index da78eb3d8..703bd4cd1 100644 --- a/lib/Service/FederatedUserService.php +++ b/lib/Service/FederatedUserService.php @@ -317,6 +317,13 @@ public function bypassCurrentUserCondition(bool $bypass): void { $this->bypass = $bypass; } + /** + * @return bool + */ + public function canBypassCurrentUserCondition(): bool { + return $this->bypass; + } + /** * @param bool $initiatedByOcc