aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/lib
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2021-06-24 01:46:44 +0200
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2021-08-18 19:56:10 +0200
commit1e19b1cc994d38b19a29494cc1579fe3182a34bd (patch)
tree76be6a27398134b2e6b9a2bc4ca2c2031b369851 /apps/settings/lib
parent2c70e4689af774d010a1106bf17559071ee926e0 (diff)
downloadnextcloud-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/lib')
-rw-r--r--apps/settings/lib/Settings/Personal/PersonalInfo.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/settings/lib/Settings/Personal/PersonalInfo.php b/apps/settings/lib/Settings/Personal/PersonalInfo.php
index 387843c5522..fede5c4f594 100644
--- a/apps/settings/lib/Settings/Personal/PersonalInfo.php
+++ b/apps/settings/lib/Settings/Personal/PersonalInfo.php
@@ -92,6 +92,7 @@ class PersonalInfo implements ISettings {
}
public function getForm(): TemplateResponse {
+ $federationEnabled = $this->appManager->isEnabledForUser('federation');
$federatedFileSharingEnabled = $this->appManager->isEnabledForUser('federatedfilesharing');
$lookupServerUploadEnabled = false;
if ($federatedFileSharingEnabled) {
@@ -124,6 +125,7 @@ class PersonalInfo implements ISettings {
'usage_relative' => round($storageInfo['relative']),
'quota' => $storageInfo['quota'],
'avatarChangeSupported' => $user->canChangeAvatar(),
+ 'federationEnabled' => $federationEnabled,
'lookupServerUploadEnabled' => $lookupServerUploadEnabled,
'avatarScope' => $account->getProperty(IAccountManager::PROPERTY_AVATAR)->getScope(),
'displayNameChangeSupported' => $user->canChangeDisplayName(),