summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@owncloud.com>2015-08-21 10:30:42 +0100
committerRobin McCorkell <rmccorkell@owncloud.com>2015-08-21 10:30:42 +0100
commit6379b1932ff6440865f765a918ff097849ed785f (patch)
tree4a074844e169c9a3236cdf40b671a7c9569d5051 /apps
parentf5bbe727dfa624c8201f2973900390435234f323 (diff)
downloadnextcloud-server-6379b1932ff6440865f765a918ff097849ed785f.tar.gz
nextcloud-server-6379b1932ff6440865f765a918ff097849ed785f.zip
Allow domain to be specified for SMB
Diffstat (limited to 'apps')
-rw-r--r--apps/files_external/lib/backend/smb.php12
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);
+ }
+ }
+
}