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:
parent
3afc41a49b
commit
d40c61a71a
|
@ -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'))
|
||||
|
|
|
@ -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'],
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue