summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2018-02-26 12:58:19 +0100
committerRobin Appelman <robin@icewind.nl>2018-02-26 14:54:30 +0100
commitd40c61a71a718db01df5a2b145be14641e2c5163 (patch)
tree6ab1be64a739aafcf1d4d6e85ae54ab55f82d6cc /apps/files_external/lib
parent3afc41a49b465272264bbd2f7264a3d8fad56855 (diff)
downloadnextcloud-server-d40c61a71a718db01df5a2b145be14641e2c5163.tar.gz
nextcloud-server-d40c61a71a718db01df5a2b145be14641e2c5163.zip
adjust external storage config format to the one used in primary storage
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_external/lib')
-rw-r--r--apps/files_external/lib/Lib/Auth/OpenStack/OpenStackV3.php3
-rw-r--r--apps/files_external/lib/Lib/Storage/Swift.php11
2 files changed, 9 insertions, 5 deletions
diff --git a/apps/files_external/lib/Lib/Auth/OpenStack/OpenStackV3.php b/apps/files_external/lib/Lib/Auth/OpenStack/OpenStackV3.php
index adf6b8012a0..ead790e0ab5 100644
--- a/apps/files_external/lib/Lib/Auth/OpenStack/OpenStackV3.php
+++ b/apps/files_external/lib/Lib/Auth/OpenStack/OpenStackV3.php
@@ -37,7 +37,8 @@ class OpenStackV3 extends AuthMechanism {
->setScheme(self::SCHEME_OPENSTACK)
->setText($l->t('OpenStack v3'))
->addParameters([
- new DefinitionParameter('userid', $l->t('User Id')),
+ new DefinitionParameter('user', $l->t('Username')),
+ new DefinitionParameter('domain', $l->t('Domain')),
(new DefinitionParameter('password', $l->t('Password')))
->setType(DefinitionParameter::VALUE_PASSWORD),
new DefinitionParameter('url', $l->t('Identity endpoint URL'))
diff --git a/apps/files_external/lib/Lib/Storage/Swift.php b/apps/files_external/lib/Lib/Storage/Swift.php
index 2f8207cac4f..a638169dcb2 100644
--- a/apps/files_external/lib/Lib/Storage/Swift.php
+++ b/apps/files_external/lib/Lib/Storage/Swift.php
@@ -162,7 +162,7 @@ class Swift extends \OC\Files\Storage\Common {
throw new StorageBadConfigException("API Key or password, Username, Bucket and Region have to be configured.");
}
- $user = isset($params['user']) ? $params['user'] : $params['userid'];
+ $user = $params['user'];
$this->id = 'swift::' . $user . md5($params['bucket']);
$bucketUrl = new Uri($params['bucket']);
@@ -181,10 +181,13 @@ class Swift extends \OC\Files\Storage\Common {
$params['autocreate'] = true;
- if (isset($params['userid'])) {
+ if (isset($params['domain'])) {
$params['user'] = [
- 'id' => $params['userid'],
- 'password' => $params['password']
+ 'name' => $params['user'],
+ 'password' => $params['password'],
+ 'domain' => [
+ 'name' => $params['domain'],
+ ]
];
}