From: hickert Date: Thu, 15 Sep 2011 09:06:29 +0000 (+0000) Subject: Backports from trunk X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9947e92da3fb043f2301f2e9227d04951e54f64c;p=gosa.git Backports from trunk -Readded sambaKickoffTime to samba-generic. It was removed by mistake. -Fixed detection of sambaMaxPwdAge git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.7@21004 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc b/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc index e53f284bc..56943662c 100644 --- a/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc +++ b/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc @@ -42,7 +42,7 @@ class wingeneric extends plugin "shadowInactive","uid","cn","sn","givenName","homeDirectory","sambaSID", "sambaPrimaryGroupSID","displayName", "sambaPwdMustChange", "sambaNTPassword","sambaPwdLastSet","sambaAcctFlags"); - var $objectclasses= array("posixAccount","person","organizationalPerson","inetOrgPerson","gosaAccount","shadowAccount","sambaSamAccount","top"); + var $objectclasses= array("posixAccount","person","organizationalPerson","inetOrgPerson","shadowAccount","sambaSamAccount","top"); var $view_logged = FALSE; @@ -54,6 +54,14 @@ class wingeneric extends plugin $this->netConfigDNS->MACisMust = FALSE; $this->netConfigDNS->IPisMust = FALSE; + // The combination of the used objectClasses may differ, remember the initial ones. + if(isset($this->attrs['objectClass'])){ + $this->objectclasses = array(); + for($i=0; $i < $this->attrs['objectClass']['count'] ; $i++ ){ + $this->objectclasses[] = $this->attrs['objectClass'][$i]; + } + } + /* Set base */ if ($this->dn == "new"){ $ui = get_userinfo(); diff --git a/gosa-plugins/samba/personal/samba/class_sambaAccount.inc b/gosa-plugins/samba/personal/samba/class_sambaAccount.inc index 1466f0a88..d0ae05d2d 100644 --- a/gosa-plugins/samba/personal/samba/class_sambaAccount.inc +++ b/gosa-plugins/samba/personal/samba/class_sambaAccount.inc @@ -514,7 +514,7 @@ class sambaAccount extends plugin if(isset($this->attrs['sambaPwdLastSet'][0])){ $last = $this->attrs['sambaPwdLastSet'][0]; $sid = $this->get_domain_info(); - if(isset($sid['sambaMaxPwdAge'][0])){ + if(isset($sid['sambaMaxPwdAge'][0]) && $sid['sambaMaxPwdAge'][0] != -1){ $d = ($last + $sid['sambaMaxPwdAge'][0]) - time(); // A negative value means the password is outdated diff --git a/gosa-plugins/samba/personal/samba/samba3.tpl b/gosa-plugins/samba/personal/samba/samba3.tpl index fb2317cae..d0ae6d52d 100644 --- a/gosa-plugins/samba/personal/samba/samba3.tpl +++ b/gosa-plugins/samba/personal/samba/samba3.tpl @@ -424,6 +424,37 @@ + + + + + +
+ {render acl=$sambaKickoffTimeACL checkbox=$multiple_support checked=$use_sambaKickoffTime} + + {/render} + + + {render acl=$sambaKickoffTimeACL} + + {if $sambaKickoffTimeACL|regex_replace:"/[cdmr]/":"" == "w"} + + {/if} + {/render} +
+ +
{render acl=$sambaLogonHoursACL mode=read_active checkbox=$multiple_support checked=$use_SetSambaLogonHours}