Compare commits

...

2 Commits

Author SHA1 Message Date
Daniel Calviño Sánchez 0518ce849d Fix "Federated" scope not shown when the lookup server is disabled
When the lookup server is disabled the address books can still be
exchanged between trusted servers. Therefore the user should be able to
set the "Federated" scope in that case.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-04-23 18:44:52 +02:00
Daniel Calviño Sánchez 45d8140add Add missing scope to test
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-04-23 18:44:52 +02:00
3 changed files with 4 additions and 4 deletions

View File

@ -31,7 +31,7 @@
} else {
this._config = new OC.Settings.UserSettings();
}
this.showFederationScopes = !!options.showFederationScopes;
this.showLookupServerScopes = !!options.showLookupServerScopes;
this._inputFields = [
'displayname',
@ -85,8 +85,7 @@
excludedScopes.push('v2-private');
}
if (!self.showFederationScopes) {
excludedScopes.push('v2-federated');
if (!self.showLookupServerScopes) {
excludedScopes.push('v2-published');
}

View File

@ -204,7 +204,7 @@ window.addEventListener('DOMContentLoaded', function () {
var federationSettingsView = new OC.Settings.FederationSettingsView({
el: settingsEl,
config: userSettings,
showFederationScopes: !!settingsEl.data('lookup-server-upload-enabled'),
showLookupServerScopes: !!settingsEl.data('lookup-server-upload-enabled'),
});
userSettings.on("sync", function() {

View File

@ -75,6 +75,7 @@ class AccountPropertyTest extends TestCase {
// current values
[IAccountManager::SCOPE_PRIVATE, IAccountManager::SCOPE_PRIVATE],
[IAccountManager::SCOPE_LOCAL, IAccountManager::SCOPE_LOCAL],
[IAccountManager::SCOPE_FEDERATED, IAccountManager::SCOPE_FEDERATED],
[IAccountManager::SCOPE_PUBLISHED, IAccountManager::SCOPE_PUBLISHED],
// legacy values
[IAccountManager::VISIBILITY_PRIVATE, IAccountManager::SCOPE_LOCAL],