From 82a31b380ab74e710a3ad20daf8c64144018310a Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Wed, 6 Apr 2022 15:43:29 -0100 Subject: [PATCH] small edit (794) Signed-off-by: Maxence Lange --- lib/Model/Circle.php | 10 ++++++++++ lib/Service/FederatedUserService.php | 7 +++++++ 2 files changed, 17 insertions(+) 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