added home drive to profile editor options

This commit is contained in:
Roland Gruber 2019-05-12 20:51:46 +02:00
parent a69ab717bd
commit c3a7fac3f3
1 changed files with 11 additions and 3 deletions

View File

@ -803,6 +803,7 @@ class windowsUser extends baseModule implements passwordService {
'windowsUser_profilePath' => 'profilePath', 'windowsUser_profilePath' => 'profilePath',
'windowsUser_homeDirectory' => 'homeDirectory', 'windowsUser_homeDirectory' => 'homeDirectory',
'windowsUser_company' => 'company', 'windowsUser_company' => 'company',
'windowsUser_homeDrive' => 'homeDrive'
); );
if (!$this->isBooleanConfigOptionSet('windowsUser_hidemsSFU30NisDomain', true)) { if (!$this->isBooleanConfigOptionSet('windowsUser_hidemsSFU30NisDomain', true)) {
$return['profile_mappings']['windowsUser_msSFU30NisDomain'] = 'msSFU30NisDomain'; $return['profile_mappings']['windowsUser_msSFU30NisDomain'] = 'msSFU30NisDomain';
@ -2804,14 +2805,21 @@ class windowsUser extends baseModule implements passwordService {
$return->add(new htmlResponsiveSelect('windowsUser_userPrincipalNameDomain', $domains, array(), _('Domain'), 'userPrincipalNameDomain'), 12); $return->add(new htmlResponsiveSelect('windowsUser_userPrincipalNameDomain', $domains, array(), _('Domain'), 'userPrincipalNameDomain'), 12);
// group memberships // group memberships
$groups = $this->findGroups(); $groups = $this->findGroups();
$groupList = array(); $groupOptions = array();
foreach ($groups as $dn) { foreach ($groups as $dn) {
$groupList[extractRDNValue($dn)] = $dn; $groupOptions[extractRDNValue($dn)] = $dn;
} }
$groupSelect = new htmlResponsiveSelect('windowsUser_groups', $groupList, array(), _('Groups'), 'groups', 10); $groupSelect = new htmlResponsiveSelect('windowsUser_groups', $groupOptions, array(), _('Groups'), 'groups', 10);
$groupSelect->setHasDescriptiveElements(true); $groupSelect->setHasDescriptiveElements(true);
$groupSelect->setMultiSelect(true); $groupSelect->setMultiSelect(true);
$return->add($groupSelect, 12); $return->add($groupSelect, 12);
// home drive
$drives = array('-');
for ($i = 90; $i > 67; $i--) {
$drives[] = chr($i) . ':';
}
$driveSelect = new htmlResponsiveSelect('windowsUser_homeDrive', $drives, array('-'), _('Home drive'), 'homeDrive');
$return->add($driveSelect, 12);
return $return; return $return;
} }