mirror of
https://github.com/nextcloud/server.git
synced 2026-07-14 20:39:17 -04:00
Merge pull request #18473 from owncloud/smb-workgroup
Allow domain to be specified for SMB
This commit is contained in:
commit
9d49e04ee9
1 changed files with 12 additions and 0 deletions
|
|
@ -45,10 +45,22 @@ 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),
|
||||
])
|
||||
->addAuthScheme(AuthMechanism::SCHEME_PASSWORD)
|
||||
->setLegacyAuthMechanism($legacyAuth)
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param StorageConfig $storage
|
||||
*/
|
||||
public function manipulateStorageConfig(StorageConfig &$storage) {
|
||||
$user = $storage->getBackendOption('user');
|
||||
if ($domain = $storage->getBackendOption('domain')) {
|
||||
$storage->setBackendOption('user', $domain.'\\'.$user);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue