diff options
author | Christopher Ng <chrng8@gmail.com> | 2022-10-25 00:13:53 +0000 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2022-10-28 00:07:05 +0000 |
commit | 531bb62223b1ec30bbfb69129effc9f87187bf52 (patch) | |
tree | 4f2ca534a4d41d6d1c911e504e96dcf51bbe751a /apps/settings/src | |
parent | d007088cf5d89e29065991e0cbe2c890dfa13d96 (diff) | |
download | nextcloud-server-531bb62223b1ec30bbfb69129effc9f87187bf52.tar.gz nextcloud-server-531bb62223b1ec30bbfb69129effc9f87187bf52.zip |
Fix disabled federated scope
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/settings/src')
-rw-r--r-- | apps/settings/src/components/PersonalInfo/shared/FederationControl.vue | 25 | ||||
-rw-r--r-- | apps/settings/src/constants/AccountPropertyConstants.js | 2 |
2 files changed, 18 insertions, 9 deletions
diff --git a/apps/settings/src/components/PersonalInfo/shared/FederationControl.vue b/apps/settings/src/components/PersonalInfo/shared/FederationControl.vue index 555b917ad1f..ea22ddf873f 100644 --- a/apps/settings/src/components/PersonalInfo/shared/FederationControl.vue +++ b/apps/settings/src/components/PersonalInfo/shared/FederationControl.vue @@ -57,7 +57,10 @@ import { import { savePrimaryAccountPropertyScope } from '../../../service/PersonalInfo/PersonalInfoService.js' import logger from '../../../logger.js' -const { lookupServerUploadEnabled } = loadState('settings', 'accountParameters', {}) +const { + federationEnabled, + lookupServerUploadEnabled, +} = loadState('settings', 'accountParameters', {}) export default { name: 'FederationControl', @@ -120,15 +123,21 @@ export default { }, supportedScopes() { - if (lookupServerUploadEnabled && !UNPUBLISHED_READABLE_PROPERTIES.includes(this.readable)) { - return [ - ...PROPERTY_READABLE_SUPPORTED_SCOPES_ENUM[this.readable], - SCOPE_ENUM.FEDERATED, - SCOPE_ENUM.PUBLISHED, - ] + const scopes = PROPERTY_READABLE_SUPPORTED_SCOPES_ENUM[this.readable] + + if (UNPUBLISHED_READABLE_PROPERTIES.includes(this.readable)) { + return scopes + } + + if (federationEnabled) { + scopes.push(SCOPE_ENUM.FEDERATED) + } + + if (lookupServerUploadEnabled) { + scopes.push(SCOPE_ENUM.PUBLISHED) } - return PROPERTY_READABLE_SUPPORTED_SCOPES_ENUM[this.readable] + return scopes }, }, diff --git a/apps/settings/src/constants/AccountPropertyConstants.js b/apps/settings/src/constants/AccountPropertyConstants.js index 17166d1305f..6be683dcb91 100644 --- a/apps/settings/src/constants/AccountPropertyConstants.js +++ b/apps/settings/src/constants/AccountPropertyConstants.js @@ -175,7 +175,7 @@ export const SCOPE_PROPERTY_ENUM = Object.freeze({ name: SCOPE_ENUM.FEDERATED, displayName: t('settings', 'Federated'), tooltip: t('settings', 'Only synchronize to trusted servers'), - tooltipDisabled: t('settings', 'Not available as publishing user specific data to the lookup server is not allowed, contact your system administrator if you have any questions'), + tooltipDisabled: t('settings', 'Not available as federation has been disabled for your account, contact your system administrator if you have any questions'), iconClass: 'icon-contacts-dark', }, [SCOPE_ENUM.PUBLISHED]: { |