diff --git a/lib/Model/Circle.php b/lib/Model/Circle.php index 79f02f3db..524cfb066 100644 --- a/lib/Model/Circle.php +++ b/lib/Model/Circle.php @@ -159,6 +159,7 @@ class Circle extends ManagedModel implements 4 => 'Email Address', 8 => 'Contact', 16 => 'Circle', + 10000 => 'Nextcloud App', 10001 => 'Circles App', 10002 => 'Admin Command Line', 11000 => '3rd party app', @@ -630,6 +631,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 10bcdef1a..816de5d97 100644 --- a/lib/Service/FederatedUserService.php +++ b/lib/Service/FederatedUserService.php @@ -338,6 +338,13 @@ public function bypassCurrentUserCondition(bool $bypass): void { $this->bypass = $bypass; } + /** + * @return bool + */ + public function canBypassCurrentUserCondition(): bool { + return $this->bypass; + } + /** * @throws SuperSessionException