diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_external/lib/backend/smb.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/files_external/lib/backend/smb.php b/apps/files_external/lib/backend/smb.php index 3d950a80c31..dc15f6d3dbf 100644 --- a/apps/files_external/lib/backend/smb.php +++ b/apps/files_external/lib/backend/smb.php @@ -42,6 +42,8 @@ class SMB extends Backend { (new DefinitionParameter('share', $l->t('Share'))), (new DefinitionParameter('root', $l->t('Remote subfolder'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), + (new DefinitionParameter('domain', $l->t('Domain'))) + ->setFlag(DefinitionParameter::FLAG_OPTIONAL), ]) ->setDependencyCheck('\OC\Files\Storage\SMB::checkDependencies') ->addAuthScheme(AuthMechanism::SCHEME_PASSWORD) @@ -49,4 +51,14 @@ class SMB extends Backend { ; } + /** + * @param StorageConfig $storage + */ + public function manipulateStorageConfig(StorageConfig &$storage) { + $user = $storage->getBackendOption('user'); + if ($domain = $storage->getBackendOption('domain')) { + $storage->setBackendOption('user', $domain.'\\'.$user); + } + } + } |