aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPytal <24800714+Pytal@users.noreply.github.com>2022-01-11 10:12:11 -0800
committerGitHub <noreply@github.com>2022-01-11 10:12:11 -0800
commit2bc0749cb6d4a11b9ae27b5287369581c6aca910 (patch)
tree3f55eea2d78340ad1a07cf1a5cc71e066cc5b812
parent796764aafd318cfeedf6d19af4551e846a40ac94 (diff)
parent172be810b8b6d401858333bcc0428dd55fe650ce (diff)
downloadnextcloud-server-2bc0749cb6d4a11b9ae27b5287369581c6aca910.tar.gz
nextcloud-server-2bc0749cb6d4a11b9ae27b5287369581c6aca910.zip
Merge pull request #30588 from nextcloud/bugfix/noid/fix-unset-scopes
-rw-r--r--lib/private/Accounts/AccountProperty.php1
-rw-r--r--tests/lib/Accounts/AccountPropertyTest.php2
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Accounts/AccountProperty.php b/lib/private/Accounts/AccountProperty.php
index 4b7f2b0c04c..896dfd247b5 100644
--- a/lib/private/Accounts/AccountProperty.php
+++ b/lib/private/Accounts/AccountProperty.php
@@ -152,6 +152,7 @@ class AccountProperty implements IAccountProperty {
switch ($scope) {
case IAccountManager::VISIBILITY_PRIVATE:
+ case '':
return IAccountManager::SCOPE_LOCAL;
case IAccountManager::VISIBILITY_CONTACTS_ONLY:
return IAccountManager::SCOPE_FEDERATED;
diff --git a/tests/lib/Accounts/AccountPropertyTest.php b/tests/lib/Accounts/AccountPropertyTest.php
index c2ba96ef8a5..55f83513349 100644
--- a/tests/lib/Accounts/AccountPropertyTest.php
+++ b/tests/lib/Accounts/AccountPropertyTest.php
@@ -84,8 +84,8 @@ class AccountPropertyTest extends TestCase {
[IAccountManager::VISIBILITY_PRIVATE, IAccountManager::SCOPE_LOCAL],
[IAccountManager::VISIBILITY_CONTACTS_ONLY, IAccountManager::SCOPE_FEDERATED],
[IAccountManager::VISIBILITY_PUBLIC, IAccountManager::SCOPE_PUBLISHED],
+ ['', IAccountManager::SCOPE_LOCAL],
// invalid values
- ['', null],
['unknown', null],
['v2-unknown', null],
];