diff options
author | Julien Lutran <julien.lutran@corp.ovh.com> | 2020-02-19 11:23:51 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2020-05-15 15:19:36 +0000 |
commit | 1a990b9487041d251264b51902a2bc07a5d4707b (patch) | |
tree | 0481bcafef35c73d268a94f3bd15a739f3693c93 | |
parent | 62950e9f9b7dab0b2d8fb886bd878cf2513d135c (diff) | |
download | nextcloud-server-1a990b9487041d251264b51902a2bc07a5d4707b.tar.gz nextcloud-server-1a990b9487041d251264b51902a2bc07a5d4707b.zip |
Fix issues with Keystone auth v3 in files_external app
Signed-off-by: Julien Lutran <julien.lutran@corp.ovh.com>
-rw-r--r-- | apps/files_external/lib/Lib/Auth/OpenStack/OpenStackV3.php | 1 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Backend/Swift.php | 3 | ||||
-rw-r--r-- | lib/private/Files/ObjectStore/SwiftFactory.php | 4 |
3 files changed, 6 insertions, 2 deletions
diff --git a/apps/files_external/lib/Lib/Auth/OpenStack/OpenStackV3.php b/apps/files_external/lib/Lib/Auth/OpenStack/OpenStackV3.php index 75f2fc3173c..c57c80e5391 100644 --- a/apps/files_external/lib/Lib/Auth/OpenStack/OpenStackV3.php +++ b/apps/files_external/lib/Lib/Auth/OpenStack/OpenStackV3.php @@ -47,6 +47,7 @@ class OpenStackV3 extends AuthMechanism { new DefinitionParameter('domain', $l->t('Domain')), (new DefinitionParameter('password', $l->t('Password'))) ->setType(DefinitionParameter::VALUE_PASSWORD), + new DefinitionParameter('tenant', $l->t('Tenant name')), new DefinitionParameter('url', $l->t('Identity endpoint URL')) ]) ; diff --git a/apps/files_external/lib/Lib/Backend/Swift.php b/apps/files_external/lib/Lib/Backend/Swift.php index e2d6c6848c4..3e5e3ead223 100644 --- a/apps/files_external/lib/Lib/Backend/Swift.php +++ b/apps/files_external/lib/Lib/Backend/Swift.php @@ -46,8 +46,7 @@ class Swift extends Backend { ->addParameters([ (new DefinitionParameter('service_name', $l->t('Service name'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), - (new DefinitionParameter('region', $l->t('Region'))) - ->setFlag(DefinitionParameter::FLAG_OPTIONAL), + new DefinitionParameter('region', $l->t('Region')), new DefinitionParameter('bucket', $l->t('Bucket')), (new DefinitionParameter('timeout', $l->t('Request timeout (seconds)'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), diff --git a/lib/private/Files/ObjectStore/SwiftFactory.php b/lib/private/Files/ObjectStore/SwiftFactory.php index 93ff02f1f8b..9aa8c13b038 100644 --- a/lib/private/Files/ObjectStore/SwiftFactory.php +++ b/lib/private/Files/ObjectStore/SwiftFactory.php @@ -119,6 +119,10 @@ class SwiftFactory { if (!isset($this->params['tenantName']) && isset($this->params['tenant'])) { $this->params['tenantName'] = $this->params['tenant']; } + if (isset($this->params['domain'])) { + $this->params['scope']['project']['name'] = $this->params['tenant']; + $this->params['scope']['project']['domain']['name'] = $this->params['domain']; + } $this->params = array_merge(self::DEFAULT_OPTIONS, $this->params); $cacheKey = $userName . '@' . $this->params['url'] . '/' . $this->params['container']; |