summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a778ad7)
raw | patch | inline | side by side (parent: a778ad7)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 14 Sep 2009 09:24:39 +0000 (09:24 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 14 Sep 2009 09:24:39 +0000 (09:24 +0000) |
- the flag is written now, but the gray out isn't implemented
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14247 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14247 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/samba/personal/samba/class_sambaAccount.inc | patch | blob | history | |
gosa-plugins/samba/personal/samba/samba3.tpl | patch | blob | history |
diff --git a/gosa-plugins/samba/personal/samba/class_sambaAccount.inc b/gosa-plugins/samba/personal/samba/class_sambaAccount.inc
index 4f0e5a093b19682f32f6779170cb35cf873d0655..8cf6e687c9ea9794b7870a3ad00599b6f8e8bb13 100644 (file)
/* Only used for multiple edit */
var $temporary_disable = FALSE;
var $no_password_required = FALSE;
+ var $no_expiry = FALSE;
var $multiple_sambaUserWorkstations = array();
function sambaAccount (&$config, $dn= NULL)
$smarty->assign("flagsN", "");
}
+ // check if password never expires
+ if (is_integer(strpos($this->sambaAcctFlags, "X"))) {
+ $smarty->assign("flagsX", "checked");
+ } else {
+ $smarty->assign("flagsX", "");
+ }
+
if($this->samba3){
if ($this->sambaPwdCanChange=="1"){
$smarty->assign("flagsP", "checked");
"inherit","CtxWorkDirectory","CtxInitialProgram","CtxMaxConnectionTimeF","CtxMaxConnectionTime","CtxMaxDisconnectionTimeF",
"CtxMaxDisconnectionTime","CtxMaxIdleTimeF","CtxMaxIdleTime","connectclientdrives",
"onnectclientprinters","defaultprinter","shadow","brokenconn",
- "reconn","allow_pwchange","connectclientprinters","no_password_required","temporary_disable",
+ "reconn","allow_pwchange","connectclientprinters","no_expiry","no_password_required","temporary_disable",
"password_expires","logon_time_set","logoff_time_set","kickoff_time_set","SetSambaLogonHours",
"workstation_list") as $attr){
if(in_array($attr,$this->multi_boxes)){
$this->pwdCanChange= $tmp;
$this->sambaPwdCanChange= $tmp;
}
- $tmp= "UX";
+ $tmp= "U";
+
+ $this->no_expiry = FALSE;
+ if (isset($_POST["no_expiry"])){
+ if ($_POST["no_expiry"] == 1){
+ $tmp.= "X";
+ $this->no_expiry = TRUE;
+ }
+ }
+
$this->no_password_required = FALSE;
if (isset($_POST["no_password_required"])){
if ($_POST["no_password_required"] == 1){
"InheritClientConfig" => _("Inherit client config"),
"sambaPwdCanChange" => _("Allow user to change password") ,
"sambaAcctFlagsN" => _("Login from windows client requires no password"),
+ "sambaAcctFlagsX" => _("Password never expires"),
"sambaAcctFlagsL" => _("Lock samba account"),
"sambaKickoffTime" => _("Account expires") ,
"sambaPwdMustChange" => _("Password expires") ,
"inherit","CtxWorkDirectory","CtxInitialProgram","CtxMaxConnectionTimeF","CtxMaxConnectionTime","CtxMaxDisconnectionTimeF",
"CtxMaxDisconnectionTime","CtxMaxIdleTimeF","CtxMaxIdleTime","connectclientdrives",
"onnectclientprinters","defaultprinter","shadow","brokenconn",
- "reconn","allow_pwchange","connectclientprinters","no_password_required","temporary_disable",
+ "reconn","allow_pwchange","connectclientprinters","no_expiry","no_password_required","temporary_disable",
"password_expires","logon_time_set","logoff_time_set","kickoff_time_set","SetSambaLogonHours",
"workstation_list") as $attr){
if(isset($_POST["use_".$attr])){
$ret['no_password_required'] = $this->no_password_required;
}
+ if(in_array("no_expiry",$this->multi_boxes)){
+ $ret['no_expiry'] = $this->no_expiry;
+ }
+
if(in_array("temporary_disable",$this->multi_boxes)){
$ret['temporary_disable'] = $this->temporary_disable;
}
}
}
+ if(isset($values['no_expiry'])){
+ if($values['no_expiry']){
+ if(!preg_match("/N/",$this->sambaAcctFlags)) {
+ $this->sambaAcctFlags = preg_replace("/ /","N",$this->sambaAcctFlags,1);
+ }
+ }else{
+ $this->sambaAcctFlags = preg_replace("/N/"," ",$this->sambaAcctFlags,1);
+ }
+ }
+
if(isset($values['temporary_disable'])){
if($values['temporary_disable']){
if(preg_match("/L/",$this->sambaAcctFlags)) {
diff --git a/gosa-plugins/samba/personal/samba/samba3.tpl b/gosa-plugins/samba/personal/samba/samba3.tpl
index 7cc5f29068eba53fffc7ccc749a0eb953db0c48f..a1cb6f9c71afd9d89ea359943e38bfbc497ffa58 100644 (file)
<!-- Samba policies -->
<table>
+ <tr>
+ <td colspan=2>
+ {render acl=$sambaAcctFlagsXACL checkbox=$multiple_support checked=$use_no_expiry}
+ <input id="no_expiry" type=checkbox name="no_expiry" value="1" {$flagsX} class="center">
+ {/render}
+ <label for="no_expiry">{t}The password never expires{/t}</label>
+ </td>
+ </tr>
<tr>
<td colspan=2>
{render acl=$sambaAcctFlagsNACL checkbox=$multiple_support checked=$use_no_password_required}