diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-10-10 14:12:10 +0200 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-10-10 14:12:10 +0200 |
commit | 20a5ce217a47c9e3d5dd4016e96e0cc557c51417 (patch) | |
tree | 5dbcb468ce4dab6cb0d205e5e2b3818e7ec2345d /settings/Application.php | |
parent | d143b43a0454528905c751579b4ab482abe39f36 (diff) | |
download | nextcloud-server-20a5ce217a47c9e3d5dd4016e96e0cc557c51417.tar.gz nextcloud-server-20a5ce217a47c9e3d5dd4016e96e0cc557c51417.zip |
Add check for well known URL of WebFinger in the settings overview
If the WebFinger service is not set in Nextcloud configuration no check
is performed.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'settings/Application.php')
-rw-r--r-- | settings/Application.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/settings/Application.php b/settings/Application.php index 5b2b606353f..4dee85f263d 100644 --- a/settings/Application.php +++ b/settings/Application.php @@ -121,6 +121,8 @@ class Application extends App { Util::connectHook('OC_User', 'post_setPassword', $this, 'onChangePassword'); Util::connectHook('OC_User', 'changeUser', $this, 'onChangeInfo'); + + Util::connectHook('\OCP\Config', 'js', $this, 'extendJsConfig'); } /** @@ -152,4 +154,18 @@ class Application extends App { $hooks = $this->getContainer()->query(Hooks::class); $hooks->onChangeEmail($parameters['user'], $parameters['old_value']); } + + /** + * @param array $settings + */ + public function extendJsConfig(array $settings) { + $appConfig = json_decode($settings['array']['oc_appconfig'], true); + + $publicWebFinger = \OC::$server->getConfig()->getAppValue('core', 'public_webfinger', ''); + if (!empty($publicWebFinger)) { + $appConfig['core']['public_webfinger'] = $publicWebFinger; + } + + $settings['array']['oc_appconfig'] = json_encode($appConfig); + } } |