aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/js
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2021-10-22 11:52:56 +0200
committerGitHub <noreply@github.com>2021-10-22 11:52:56 +0200
commitc98039c1df19f8b53efea5b627d5e8f183ec77c3 (patch)
treefd4fef772d501f21573bdf1a16e30a68c907060d /apps/settings/js
parent0a359376628b36256aa8332d79b1af1dfc513ce8 (diff)
parent193cf6cfde8a91e225947021e582997403074c78 (diff)
downloadnextcloud-server-c98039c1df19f8b53efea5b627d5e8f183ec77c3.tar.gz
nextcloud-server-c98039c1df19f8b53efea5b627d5e8f183ec77c3.zip
Merge pull request #26725 from nextcloud/fix-federated-scope-not-shown-when-public-addressbook-upload-is-disabled
Diffstat (limited to 'apps/settings/js')
-rw-r--r--apps/settings/js/federationsettingsview.js13
-rw-r--r--apps/settings/js/settings/personalInfo.js3
2 files changed, 12 insertions, 4 deletions
diff --git a/apps/settings/js/federationsettingsview.js b/apps/settings/js/federationsettingsview.js
index 602acab5c8d..ca56992b1ed 100644
--- a/apps/settings/js/federationsettingsview.js
+++ b/apps/settings/js/federationsettingsview.js
@@ -15,7 +15,10 @@
* @constructs FederationScopeMenu
* @memberof OC.Settings
* @param {object} options
- * @param {bool} [options.lookupServerUploadEnabled=false] whether uploading to the lookup server is enabled
+ * @param {bool} [options.showFederatedScope=false] whether show the
+ * "v2-federated" scope or not
+ * @param {bool} [options.showPublishedScope=false] whether show the
+ * "v2-published" scope or not
*/
var FederationSettingsView = OC.Backbone.View.extend({
_inputFields: undefined,
@@ -31,7 +34,8 @@
} else {
this._config = new OC.Settings.UserSettings();
}
- this.showFederationScopes = !!options.showFederationScopes;
+ this.showFederatedScope = !!options.showFederatedScope;
+ this.showPublishedScope = !!options.showPublishedScope;
this._inputFields = [
'displayname',
@@ -85,8 +89,11 @@
excludedScopes.push('v2-private');
}
- if (!self.showFederationScopes) {
+ if (!self.showFederatedScope) {
excludedScopes.push('v2-federated');
+ }
+
+ if (!self.showPublishedScope) {
excludedScopes.push('v2-published');
}
diff --git a/apps/settings/js/settings/personalInfo.js b/apps/settings/js/settings/personalInfo.js
index 1e2a8d58ab9..a4b1713c662 100644
--- a/apps/settings/js/settings/personalInfo.js
+++ b/apps/settings/js/settings/personalInfo.js
@@ -204,7 +204,8 @@ window.addEventListener('DOMContentLoaded', function () {
var federationSettingsView = new OC.Settings.FederationSettingsView({
el: settingsEl,
config: userSettings,
- showFederationScopes: !!settingsEl.data('lookup-server-upload-enabled'),
+ showFederatedScope: !!settingsEl.data('federation-enabled'),
+ showPublishedScope: !!settingsEl.data('lookup-server-upload-enabled'),
});
userSettings.on("sync", function() {