diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2021-06-24 01:46:44 +0200 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2021-08-18 19:56:10 +0200 |
commit | 1e19b1cc994d38b19a29494cc1579fe3182a34bd (patch) | |
tree | 76be6a27398134b2e6b9a2bc4ca2c2031b369851 /apps/settings/js | |
parent | 2c70e4689af774d010a1106bf17559071ee926e0 (diff) | |
download | nextcloud-server-1e19b1cc994d38b19a29494cc1579fe3182a34bd.tar.gz nextcloud-server-1e19b1cc994d38b19a29494cc1579fe3182a34bd.zip |
Hide "federated" scope when Federation app is disabled
If the Federation app is disabled it is not possible to synchronize the
users from a different server.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'apps/settings/js')
-rw-r--r-- | apps/settings/js/federationsettingsview.js | 7 | ||||
-rw-r--r-- | apps/settings/js/settings/personalInfo.js | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/apps/settings/js/federationsettingsview.js b/apps/settings/js/federationsettingsview.js index 58e2583546c..ca56992b1ed 100644 --- a/apps/settings/js/federationsettingsview.js +++ b/apps/settings/js/federationsettingsview.js @@ -15,6 +15,8 @@ * @constructs FederationScopeMenu * @memberof OC.Settings * @param {object} options + * @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 */ @@ -32,6 +34,7 @@ } else { this._config = new OC.Settings.UserSettings(); } + this.showFederatedScope = !!options.showFederatedScope; this.showPublishedScope = !!options.showPublishedScope; this._inputFields = [ @@ -86,6 +89,10 @@ excludedScopes.push('v2-private'); } + 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 72ce39d5693..dcac153c1f6 100644 --- a/apps/settings/js/settings/personalInfo.js +++ b/apps/settings/js/settings/personalInfo.js @@ -204,6 +204,7 @@ window.addEventListener('DOMContentLoaded', function () { var federationSettingsView = new OC.Settings.FederationSettingsView({ el: settingsEl, config: userSettings, + showFederatedScope: !!settingsEl.data('federation-enabled'), showPublishedScope: !!settingsEl.data('lookup-server-upload-enabled'), }); |