summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9e07081)
raw | patch | inline | side by side (parent: 9e07081)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 7 Jul 2010 13:16:46 +0000 (13:16 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 7 Jul 2010 13:16:46 +0000 (13:16 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18951 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 59718f66a83421a19db064a93761c6155c24e348..d83196507fdc0eebbda6e7ad0f10e6bc5d116c53 100644 (file)
var $sambaSID= "";
var $sambaPwdLastSet= "0";
var $sambaPwdCanChange= "";
+ var $cannotChangePassword = FALSE;
var $sambaPwdMustChange= "0";
var $sambaAcctFlags= "[UX ]";
var $sambaHomePath= "";
var $objectclasses= array('sambaSamAccount');
var $uid= "";
- var $CopyPasteVars = array("mungedObject","orig_sambaDomainName",'enforcePasswordChange');
+ var $CopyPasteVars = array("mungedObject","orig_sambaDomainName",'enforcePasswordChange','cannotChangePassword');
var $multiple_support = TRUE;
// Check if we've the attribute 'sambaPwdLastSet' set and if its value is 0,
// in this case a password change is forced for this account.
$this->enforcePasswordChange = (isset($this->attrs['sambaPwdLastSet']) && $this->attrs['sambaPwdLastSet'][0] == '0');
+
+ // User cannot change his password? (sambaPwdLastSet int max(Int))
+ // --------------------------------
+ // The user is not able to change his password while sambaPwdCanChange is 4294967295 (Integer 32 Bit max)
+ $this->cannotChangePassword = (isset($this->attrs['sambaPwdCanChange']) && $this->attrs['sambaPwdCanChange'][0] == '4294967295');
}
function execute()
"onnectclientprinters","defaultprinter","shadow","brokenconn",
"reconn","allow_pwchange","connectclientprinters","no_expiry","no_password_required","temporary_disable",
"password_expires","SetSambaLogonHours",
- "workstation_list", "enforcePasswordChange") as $attr){
+ "workstation_list", "enforcePasswordChange", "cannotChangePassword") as $attr){
if(in_array($attr,$this->multi_boxes)){
$smarty->assign("use_".$attr,TRUE);
}else{
/* Show main page */
$smarty->assign("multiple_support",$this->multiple_support_active);
$smarty->assign('enforcePasswordChange', $this->enforcePasswordChange);
+ $smarty->assign("cannotChangePassword", $this->cannotChangePassword);
$display.= $smarty->fetch (get_template_path('samba3.tpl', TRUE, dirname(__FILE__)));
return ($display);
}
$this->enforcePasswordChange = (isset($_POST['enforcePasswordChange']));
+ $this->cannotChangePassword = (isset($_POST['cannotChangePassword']));
if(isset($_POST['display_information'])){
msg_dialog::display(_("Information"),
}
}
+ if($this->cannotChangePassword){
+ $this->attrs['sambaPwdCanChange'] = 4294967295;
+ }
+
/* Generate rid / primaryGroupId */
if (!isset($this->config->data['SERVERS']['SAMBA'][$this->sambaDomainName]['SID'])){
msg_dialog::display(_("Warning"), _("Undefined Samba SID detected. Please fix this problem manually!"), WARNING_DIALOG);
"sambaAcctFlagsN" => _("Login from windows client requires no password"),
"sambaAcctFlagsX" => _("Password never expires"),
"enforcePasswordChange" => _("Enforce password change"),
+ "cannotChangePassword" => _("Cannot change password"),
"sambaAcctFlagsL" => _("Lock samba account"),
"sambaLogonHours" => _("Logon hours") ,
"sambaUserWorkstations" => _("Allow connection from"))
"onnectclientprinters","defaultprinter","shadow","brokenconn",
"reconn","allow_pwchange","connectclientprinters","no_expiry","no_password_required","temporary_disable",
"password_expires", "SetSambaLogonHours",
- "workstation_list", "enforcePasswordChange") as $attr){
+ "workstation_list", "enforcePasswordChange","cannotChangePassword") as $attr){
if(isset($_POST["use_".$attr])){
$this->multi_boxes[] = $attr;
}
if(in_array("enforcePasswordChange",$this->multi_boxes)){
$ret['enforcePasswordChange'] = $this->enforcePasswordChange;
}
+ if(in_array("cannotChangePassword",$this->multi_boxes)){
+ $ret['cannotChangePassword'] = $this->cannotChangePassword;
+ }
if(in_array("password_expires",$this->multi_boxes)){
$ret['password_expires'] = $this->password_expires;
diff --git a/gosa-plugins/samba/personal/samba/samba3.tpl b/gosa-plugins/samba/personal/samba/samba3.tpl
index c54159016f9084106e5e61bd4d809a5ce7df55b7..83fa6eed9e8cc47cc66d52cfd2ed4b303061e517 100644 (file)
<label for="temporary_disable">{t}Lock samba account{/t}</label>
</td>
</tr>
+ <td>
+ {render acl=$cannotChangePasswordACL checkbox=$multiple_support checked=$use_cannotChangePassword}
+ <input id="cannotChangePassword" type=checkbox name="cannotChangePassword" value="1" class="center"
+ {if $cannotChangePassword} checked {/if}>
+ {/render}
+ </td>
+ <td>
+ <label for="cannotChangePassword">{t}Cannot change password{/t}</label>
+ </td>
+ </tr>
<tr>
<td>
</td>