mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
Merge pull request #34862 from nextcloud/backport/34785/stable25
[stable25] Fix disabled federated scope
This commit is contained in:
commit
0cb14bdcb4
8 changed files with 26 additions and 18 deletions
|
|
@ -138,7 +138,6 @@ class PersonalInfo implements ISettings {
|
|||
$messageParameters = $this->getMessageParameters($account);
|
||||
|
||||
$parameters = [
|
||||
'federationEnabled' => $federationEnabled,
|
||||
'lookupServerUploadEnabled' => $lookupServerUploadEnabled,
|
||||
'isFairUseOfFreePushService' => $this->isFairUseOfFreePushService(),
|
||||
'profileEnabledGlobally' => $this->profileManager->isProfileEnabled(),
|
||||
|
|
@ -171,6 +170,7 @@ class PersonalInfo implements ISettings {
|
|||
$accountParameters = [
|
||||
'avatarChangeSupported' => $user->canChangeAvatar(),
|
||||
'displayNameChangeSupported' => $user->canChangeDisplayName(),
|
||||
'federationEnabled' => $federationEnabled,
|
||||
'lookupServerUploadEnabled' => $lookupServerUploadEnabled,
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
return PROPERTY_READABLE_SUPPORTED_SCOPES_ENUM[this.readable]
|
||||
if (federationEnabled) {
|
||||
scopes.push(SCOPE_ENUM.FEDERATED)
|
||||
}
|
||||
|
||||
if (lookupServerUploadEnabled) {
|
||||
scopes.push(SCOPE_ENUM.PUBLISHED)
|
||||
}
|
||||
|
||||
return scopes
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -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]: {
|
||||
|
|
|
|||
|
|
@ -43,8 +43,7 @@ script('settings', [
|
|||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div id="personal-settings" data-federation-enabled="<?php p($_['federationEnabled'] ? 'true' : 'false') ?>"
|
||||
data-lookup-server-upload-enabled="<?php p($_['lookupServerUploadEnabled'] ? 'true' : 'false') ?>">
|
||||
<div id="personal-settings">
|
||||
<h2 class="hidden-visually"><?php p($l->t('Personal info')); ?></h2>
|
||||
<div id="personal-settings-avatar-container" class="personal-settings-container">
|
||||
<div id="vue-avatar-section"></div>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
dist/settings-vue-settings-personal-info.js
vendored
4
dist/settings-vue-settings-personal-info.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue