aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-12-14 15:56:07 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-12-16 13:13:05 +0100
commit6995223b1ed202c7f8e920e83cb5b53efd7ce761 (patch)
tree76e839b9c3de3b4751a993f24f35f0cb93c0dbbd /apps
parentd37034f1612279b07c78284771ac73fbd5a2a407 (diff)
downloadnextcloud-server-6995223b1ed202c7f8e920e83cb5b53efd7ce761.tar.gz
nextcloud-server-6995223b1ed202c7f8e920e83cb5b53efd7ce761.zip
Add well known handlers API
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps')
-rw-r--r--apps/settings/js/admin.js8
-rw-r--r--apps/settings/lib/AppInfo/Application.php21
2 files changed, 4 insertions, 25 deletions
diff --git a/apps/settings/js/admin.js b/apps/settings/js/admin.js
index 9252125de12..cffaefa3821 100644
--- a/apps/settings/js/admin.js
+++ b/apps/settings/js/admin.js
@@ -256,10 +256,10 @@ window.addEventListener('DOMContentLoaded', function(){
// run setup checks then gather error messages
$.when(
OC.SetupChecks.checkWebDAV(),
- OC.SetupChecks.checkWellKnownUrl('/.well-known/webfinger', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true && !!OC.appConfig.core.public_webfinger, [200, 404]),
- OC.SetupChecks.checkWellKnownUrl('/.well-known/nodeinfo', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true && !!OC.appConfig.core.public_nodeinfo, [200, 404]),
- OC.SetupChecks.checkWellKnownUrl('/.well-known/caldav', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true),
- OC.SetupChecks.checkWellKnownUrl('/.well-known/carddav', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true),
+ OC.SetupChecks.checkWellKnownUrl('GET', '/.well-known/webfinger', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true, [200, 404], true),
+ OC.SetupChecks.checkWellKnownUrl('GET', '/.well-known/nodeinfo', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true, [200, 404], true),
+ OC.SetupChecks.checkWellKnownUrl('PROPFIND', '/.well-known/caldav', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true),
+ OC.SetupChecks.checkWellKnownUrl('PROPFIND', '/.well-known/carddav', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true),
OC.SetupChecks.checkProviderUrl(OC.getRootPath() + '/ocm-provider/', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true),
OC.SetupChecks.checkProviderUrl(OC.getRootPath() + '/ocs-provider/', OC.theme.docPlaceholderUrl, $('#postsetupchecks').data('check-wellknown') === true),
OC.SetupChecks.checkSetup(),
diff --git a/apps/settings/lib/AppInfo/Application.php b/apps/settings/lib/AppInfo/Application.php
index fe9ba63b012..af45c56e517 100644
--- a/apps/settings/lib/AppInfo/Application.php
+++ b/apps/settings/lib/AppInfo/Application.php
@@ -163,8 +163,6 @@ class Application extends App implements IBootstrap {
$groupManager->listen('\OC\Group', 'postRemoveUser', [$this, 'removeUserFromGroup']);
$groupManager->listen('\OC\Group', 'postAddUser', [$this, 'addUserToGroup']);
});
-
- Util::connectHook('\OCP\Config', 'js', $this, 'extendJsConfig');
}
public function addUserToGroup(IGroup $group, IUser $user): void {
@@ -209,23 +207,4 @@ class Application extends App implements IBootstrap {
$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;
- }
-
- $publicNodeInfo = \OC::$server->getConfig()->getAppValue('core', 'public_nodeinfo', '');
- if (!empty($publicNodeInfo)) {
- $appConfig['core']['public_nodeinfo'] = $publicNodeInfo;
- }
-
- $settings['array']['oc_appconfig'] = json_encode($appConfig);
- }
}