Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-12-03 16:21:43 +0300
committerGitHub <noreply@github.com>2020-12-03 16:21:43 +0300
commit2473b5042bedefb8d6f197801c6d382c361ab7d3 (patch)
tree530e7a6ffb5a0c8a0b9446dcaa136669fd8342dc
parent523210eb6624cbfd770e7b4223a887a7335b085a (diff)
parent7c4eb03bb2e30860c13ffe6cf6800b1e0cf00a32 (diff)
Merge pull request #989 from nextcloud/enh/949
Show hint about missing capabilities endpoint connection
-rw-r--r--lib/Controller/SettingsController.php6
-rw-r--r--src/components/AdminSettings.vue3
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/Controller/SettingsController.php b/lib/Controller/SettingsController.php
index e5a45dd8..ce73dd1d 100644
--- a/lib/Controller/SettingsController.php
+++ b/lib/Controller/SettingsController.php
@@ -194,6 +194,12 @@ class SettingsController extends Controller{
$this->capabilitiesService->clear();
$this->capabilitiesService->refetch();
+ if ($this->capabilitiesService->getCapabilities() === []) {
+ return new JSONResponse([
+ 'status' => 'error',
+ 'data' => ['message' => 'Failed to connect to the remote server', 'hint' => 'missing_capabilities']
+ ], 500);
+ }
$response = [
'status' => 'success',
diff --git a/src/components/AdminSettings.vue b/src/components/AdminSettings.vue
index 6a2b1581..c0b0f345 100644
--- a/src/components/AdminSettings.vue
+++ b/src/components/AdminSettings.vue
@@ -443,6 +443,9 @@ export default {
} catch (e) {
console.error(e)
this.serverError = SERVER_STATE_CONNECTION_ERROR
+ if (e.response.data.hint === 'missing_capabilities') {
+ OCP.Toast.warning('Could not connect to the /hosting/capabilities endpoint. Please check if your webserver configuration is up to date.')
+ }
}
this.checkIfDemoServerIsActive()
},