From 89d550b40477acfc68428eed10a07ada58cad0c4 Mon Sep 17 00:00:00 2001 From: janw Date: Fri, 13 May 2005 11:45:04 +0000 Subject: [PATCH] Removed option in flavor of case handling flag 'L' stronger than flag 'D'. Renamed Option 'temporary disable account' to 'lock samba account' cause it fits better to actual case.. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@203 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/samba/class_sambaAccount.inc | 35 +++++++++++-------- plugins/personal/samba/samba3.tpl | 3 -- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/plugins/personal/samba/class_sambaAccount.inc b/plugins/personal/samba/class_sambaAccount.inc index 2fc31e6f5..ce752adc5 100644 --- a/plugins/personal/samba/class_sambaAccount.inc +++ b/plugins/personal/samba/class_sambaAccount.inc @@ -495,19 +495,20 @@ class sambaAccount extends plugin $smarty->assign("$val"."ACL", chkacl($this->acl,$val)); } - /* Checkboxes */ - foreach(array( - "N" => "no_password_required", - "D" => "temporary_disable", - "L" => "automatically_disable") - as $key => $val){ - if (is_integer(strpos($this->sambaAcctFlags, "$key"))) { - $smarty->assign("flags$key", "checked"); - } else { - $smarty->assign("flags$key", ""); - } - $smarty->assign("$val"."ACL", chkacl($this->acl, "$val")); + + /* 'sambaAcctFlags' checkboxes */ + /* Check for 'lock-account'-flag: 'D' or 'L' */ + if (is_integer(strpos($this->sambaAcctFlags, "D")) || + is_integer(strpos($this->sambaAcctFlags, "L"))) { + $smarty->assign("flagsD", "checked"); + } + + /* Check for no_password_required flag 'N' */ + if (is_integer(strpos($this->sambaAcctFlags, "N"))) { + $smarty->assign("flagsN", "checked"); } + + /* 'normal' Checkboxes */ if ($this->pwdCanChange=="1"){ $smarty->assign("flagsP", "checked"); } @@ -526,6 +527,8 @@ class sambaAccount extends plugin $smarty->assign("allow_pwchangeACL", chkacl($this->acl, "allow_pwchange")); $smarty->assign("password_expiresACL", chkacl($this->acl, "password_expires")); + $smarty->assign("no_password_requiredACL", chkacl($this->acl, "no_password_required")); + $smarty->assign("temporary_disableACL", chkacl($this->acl, "temporary_disable")); $smarty->assign("sambaDomainNameACL", chkacl($this->acl, "sambaDomainName")); $smarty->assign("logon_time_setACL", chkacl($this->acl, "logon_time_set")); $smarty->assign("logoff_time_setACL", chkacl($this->acl, "logoff_time_set")); @@ -654,7 +657,11 @@ class sambaAccount extends plugin } if (isset($_POST["temporary_disable"])){ if ($_POST["temporary_disable"] == 1){ - $tmp.= "D"; + if (is_integer(strpos($this->sambaAcctFlags, "L"))) { + $tmp.= "L"; + } else { + $tmp.= "D"; + } } } if (isset($_POST["logon_time_set"])){ @@ -752,7 +759,6 @@ class sambaAccount extends plugin } } } - } @@ -863,7 +869,6 @@ class sambaAccount extends plugin # Set more useful default setting $this->attrs['sambaKickoffTime']= 2147483647; } - } else { /* Not samba3 */ $this->attrs['rid']= $this->uidNumber*2 + 1000; diff --git a/plugins/personal/samba/samba3.tpl b/plugins/personal/samba/samba3.tpl index 93e5d20ff..76914cb25 100644 --- a/plugins/personal/samba/samba3.tpl +++ b/plugins/personal/samba/samba3.tpl @@ -219,9 +219,6 @@ {t}Login from windows client requires no password{/t}
- {t}Temporary disable samba account{/t} -
- {t}Lock samba account{/t}
-- 2.30.2