summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d68aec4)
raw | patch | inline | side by side (parent: d68aec4)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 18 Dec 2007 14:58:15 +0000 (14:58 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 18 Dec 2007 14:58:15 +0000 (14:58 +0000) |
- Implemented samba attributes.
- Some checks are missing.
- Logon Hours missing
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8139 594d385d-05f5-0310-b6e9-bd551577e9d8
- Some checks are missing.
- Logon Hours missing
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8139 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/personal/samba/class_sambaAccount.inc | patch | blob | history |
diff --git a/gosa-core/plugins/personal/samba/class_sambaAccount.inc b/gosa-core/plugins/personal/samba/class_sambaAccount.inc
index 61fc54a528bf0fa4f4d410a56d098fa6d317df41..4de21f4935a1f8635de40597eb705cd965fbd137 100644 (file)
var $CopyPasteVars = array("kickoff_time_set","logoff_time_set","logon_time_set","mungedObject","orig_sambaDomainName");
var $multiple_support = TRUE;
+ /* Only used for multiple edit */
+ var $temporary_disable = FALSE;
+ var $no_password_required = FALSE;
function sambaAccount (&$config, $dn= NULL)
{
$this->sambaPwdCanChange= $tmp;
}
$tmp= "UX";
+ $this->no_password_required = FALSE;
if (isset($_POST["no_password_required"])){
if ($_POST["no_password_required"] == 1){
$tmp.= "N";
+ $this->no_password_required = TRUE;
}
}
if (isset($_POST["password_expires"])){
} else {
$this->password_expires= 0;
}
+ $this->temporary_disable = FALSE;
if (isset($_POST["temporary_disable"])){
if ($_POST["temporary_disable"] == 1){
+ $this->temporary_disable = TRUE;
if (is_integer(strpos($this->sambaAcctFlags, "L"))) {
$tmp.= "L";
} else {
$ret["reconn"] =$this->mungedObject->getReConn();
}
- print_a($ret);
+ /* Flags */
+ if(in_array("allow_pwchange",$this->multi_boxes)){
+ $ret['sambaPwdCanChange'] = $this->sambaPwdCanChange;
+ $ret['pwdCanChange'] = $this->pwdCanChange;
+ }
+
+ if(in_array("password_expires",$this->multi_boxes)){
+ $ret['password_expires'] = $this->password_expires;
+ $ret['sambaPwdMustChange']= $this->sambaPwdMustChange;
+ }
+ if(in_array("logon_time_set",$this->multi_boxes)){
+ $ret['logon_time_set'] = $this->logon_time_set;
+ $ret['sambaLogonTime'] = $this->sambaLogonTime;
+ }
+ if(in_array("logoff_time_set",$this->multi_boxes)){
+ $ret['logoff_time_set'] = $this->logoff_time_set;
+ $ret['sambaLogoffTime'] = $this->sambaLogoffTime;
+ }
+ if(in_array("kickoff_time_set",$this->multi_boxes)){
+ $ret['kickoff_time_set'] = $this->kickoff_time_set;
+ $ret['sambaKickoffTime'] = $this->sambaKickoffTime;
+ }
+
+ if(in_array("no_password_required",$this->multi_boxes)){
+ $ret['no_password_required'] = $this->no_password_required;
+ }
+
+ if(in_array("temporary_disable",$this->multi_boxes)){
+ $ret['temporary_disable'] = $this->temporary_disable;
+ }
+
return($ret);
}
if(isset($values['shadow'])) $this->mungedObject->setShadow($values['shadow'],$values['shadow']);
if(isset($values['brokenconn'])) $this->mungedObject->setBrokenConn($values['brokenconn'],$values['brokenconn']);
if(isset($values['reconn'])) $this->mungedObject->setReConn($values['reconn'],$values['reconn']);
+
+
+ if(isset($values['sambaPwdCanChange'])) $this->sambaPwdCanChange = $values['sambaPwdCanChange'];
+ if(isset($values['pwdCanChange'])) $this->pwdCanChange = $values['pwdCanChange'];
+
+
+
+
+ if(isset($values['password_expires'])){
+ $this->password_expires = $values['password_expires'];
+ $this->sambaPwdMustChange = $values['sambaPwdMustChange'];
+ }
+ if(isset($values['logon_time_set'])){
+ $this->logon_time_set = $values['logon_time_set'];
+ $this->sambaLogonTime = $values['sambaLogonTime'];
+ }
+ if(isset($values['logoff_time_set'])){
+ $this->logoff_time_set = $values['logoff_time_set'];
+ $this->sambaLogoffTime = $values['sambaLogoffTime'];
+ }
+ if(isset($values['kickoff_time_set'])){
+ $this->kickoff_time_set = $values['kickoff_time_set'];
+ $this->sambaKickoffTime = $values['sambaKickoffTime'];
+ }
+
+ if(isset($values['no_password_required'])){
+ if($values['no_password_required']){
+ 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)) {
+ // Keep L
+ }else{
+ $this->sambaAcctFlags = preg_replace("/ /","D",$this->sambaAcctFlags,1);
+ }
+ }else{
+ $this->sambaAcctFlags = preg_replace("/D/"," ",$this->sambaAcctFlags,1);
+ }
+ }
}
}