fixed problem that Windows group was initially set to Domain admin

This commit is contained in:
Roland Gruber 2010-11-20 20:25:45 +00:00
parent 4722dc955e
commit a7b744475c
1 changed files with 3 additions and 8 deletions

View File

@ -222,22 +222,17 @@ class sambaGroupMapping extends baseModule {
$displayNameInput->setFieldMaxLength(50);
$return->addElement($displayNameInput, true);
// Windows group
$selected = array();
$options = array($this->getCn());
$selected = array($this->getCn());
$names = array_keys($this->rids);
$wrid=false;
for ($i=0; $i<count($names); $i++) {
if (isset($this->attributes['sambaSID'][0]) && ($this->attributes['sambaSID'][0]==$SID."-".$this->rids[$names[$i]])) {
$selected[] = $names[$i];
$selected = array($names[$i]);
$wrid=true;
}
$options[] = $names[$i];
}
if ($wrid) {
$options[] = $this->getCn();
}
else {
$selected[] = $this->getCn();
}
$return->addElement(new htmlTableExtendedSelect('sambaSID', $options, $selected, _('Windows group'), 'sambaSID'), true);
// group type
$names = array_keys($this->sambaGroupTypes);