adjust external storage config format to the one used in primary storage

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2018-02-26 12:58:19 +01:00
parent 3afc41a49b
commit d40c61a71a
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
2 changed files with 9 additions and 5 deletions

View File

@ -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'))

View File

@ -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'],
]
];
}