diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-09 15:33:47 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-09 15:33:47 +0100 |
commit | 1199b539f2813d127195bf1b63e81fcfe8dab19b (patch) | |
tree | cf3e4ed8e040027e351063a42e31c428d8744ff2 /apps/files_external/command | |
parent | 232bb75329c251671d7ece910148deff5cf47b07 (diff) | |
parent | 76d9586339d59f7e2aaa2aecce45df7e324e8532 (diff) | |
download | nextcloud-server-1199b539f2813d127195bf1b63e81fcfe8dab19b.tar.gz nextcloud-server-1199b539f2813d127195bf1b63e81fcfe8dab19b.zip |
Merge pull request #21773 from owncloud/files_external-list-authtype
Show the proper auth identifier when listing mounts as json
Diffstat (limited to 'apps/files_external/command')
-rw-r--r-- | apps/files_external/command/import.php | 4 | ||||
-rw-r--r-- | apps/files_external/command/listcommand.php | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_external/command/import.php b/apps/files_external/command/import.php index fe27051359c..28032c207b5 100644 --- a/apps/files_external/command/import.php +++ b/apps/files_external/command/import.php @@ -194,8 +194,8 @@ class Import extends Base { $mount = new StorageConfig($data['mount_id']); $mount->setMountPoint($data['mount_point']); $mount->setBackend($this->getBackendByClass($data['storage'])); - $authBackends = $this->backendService->getAuthMechanismsByScheme([$data['authentication_type']]); - $mount->setAuthMechanism(current($authBackends)); + $authBackend = $this->backendService->getAuthMechanism($data['authentication_type']); + $mount->setAuthMechanism($authBackend); $mount->setBackendOptions($data['configuration']); $mount->setMountOptions($data['options']); $mount->setApplicableUsers(isset($data['applicable_users']) ? $data['applicable_users'] : []); diff --git a/apps/files_external/command/listcommand.php b/apps/files_external/command/listcommand.php index c978ae5cfcb..5a0794be4c5 100644 --- a/apps/files_external/command/listcommand.php +++ b/apps/files_external/command/listcommand.php @@ -146,7 +146,7 @@ class ListCommand extends Base { $config->getId(), $config->getMountPoint(), $config->getBackend()->getStorageClass(), - $config->getAuthMechanism()->getScheme(), + $config->getAuthMechanism()->getIdentifier(), $config->getBackendOptions(), $config->getMountOptions() ]; |