From 8413ed947577a37c79ceebfc827acd37494d1a37 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Wed, 12 May 2021 00:33:26 +0200 Subject: allow to set valid scopes only in AccountProperty the auto-fallback to v2-local is removed as well to react on wrong input Signed-off-by: Arthur Schiwon --- apps/provisioning_api/lib/Controller/UsersController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/provisioning_api') diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index 84fdaf8bc89..f254620f330 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -759,8 +759,8 @@ class UsersController extends AUserData { $userAccount = $this->accountManager->getAccount($targetUser); $userProperty = $userAccount->getProperty($propertyName); if ($userProperty->getScope() !== $value) { - $userProperty->setScope($value); try { + $userProperty->setScope($value); $this->accountManager->updateAccount($userAccount); } catch (\InvalidArgumentException $e) { throw new OCSException('Invalid ' . $e->getMessage(), 102); -- cgit v1.2.3