summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/command/create.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/files_external/command/create.php b/apps/files_external/command/create.php
index 2f2f0ca8f73..b2def1135bb 100644
--- a/apps/files_external/command/create.php
+++ b/apps/files_external/command/create.php
@@ -142,6 +142,11 @@ class Create extends Base {
$output->writeln('<error>Authentication backend with identifier "' . $authIdentifier . '" not found (see `occ files_external:backends` for possible values)</error>');
return 404;
}
+ $supportedSchemes = array_keys($storageBackend->getAuthSchemes());
+ if (!in_array($authBackend->getScheme(), $supportedSchemes)) {
+ $output->writeln('<error>Authentication backend "' . $authIdentifier . '" not valid for storage backend "' . $storageIdentifier . '" (see `occ files_external:backends storage ' . $storageIdentifier . '` for possible values)</error>');
+ return 1;
+ }
$config = [];
foreach ($configInput as $configOption) {