From a7b744475ca75509145de2f089d034e97ad27c04 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 20 Nov 2010 20:25:45 +0000 Subject: [PATCH] fixed problem that Windows group was initially set to Domain admin --- lam/lib/modules/sambaGroupMapping.inc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/lam/lib/modules/sambaGroupMapping.inc b/lam/lib/modules/sambaGroupMapping.inc index bf72a4e5..bb8262da 100644 --- a/lam/lib/modules/sambaGroupMapping.inc +++ b/lam/lib/modules/sambaGroupMapping.inc @@ -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; $iattributes['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);