update import logic for the new export logic

This commit is contained in:
Robin Appelman 2016-01-18 12:06:10 +01:00
parent e3eda917ef
commit 71992f9d29
1 changed files with 2 additions and 2 deletions

View File

@ -194,8 +194,8 @@ class Import extends Base {
$mount = new StorageConfig($data['mount_id']);
$mount->setMountPoint($data['mount_point']);
$mount->setBackend($this->getBackendByClass($data['storage']));
$authBackends = $this->backendService->getAuthMechanismsByScheme([$data['authentication_type']]);
$mount->setAuthMechanism(current($authBackends));
$authBackend = $this->backendService->getAuthMechanism($data['authentication_type']);
$mount->setAuthMechanism($authBackend);
$mount->setBackendOptions($data['configuration']);
$mount->setMountOptions($data['options']);
$mount->setApplicableUsers(isset($data['applicable_users']) ? $data['applicable_users'] : []);