From: hickert Date: Wed, 28 Apr 2010 12:06:39 +0000 (+0000) Subject: Updated sambaLogonHours X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c4fb32f26d878461ef689312fef2879723967a14;p=gosa.git Updated sambaLogonHours -Fixed ACL checks. We are now able to set the logon hours restriction for new users too. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17907 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/samba/personal/samba/class_sambaAccount.inc b/gosa-plugins/samba/personal/samba/class_sambaAccount.inc index a6976a7af..6005d11e2 100644 --- a/gosa-plugins/samba/personal/samba/class_sambaAccount.inc +++ b/gosa-plugins/samba/personal/samba/class_sambaAccount.inc @@ -220,7 +220,7 @@ class sambaAccount extends plugin /* Open Samaba Logong hours dialog */ if(isset($_POST['SetSambaLogonHours']) && $this->acl_is_readable("sambaLogonHours")){ - $this->dialog = new sambaLogonHours($this->config,$this->dn,$this->sambaLogonHours); + $this->dialog = new sambaLogonHours($this->config,$this->dn,$this->sambaLogonHours, $this->getacl('sambaLogonHours')); } /* Cancel dialog */ diff --git a/gosa-plugins/samba/personal/samba/class_sambaLogonHours.inc b/gosa-plugins/samba/personal/samba/class_sambaLogonHours.inc index eea7cfb2a..6e9d4c747 100644 --- a/gosa-plugins/samba/personal/samba/class_sambaLogonHours.inc +++ b/gosa-plugins/samba/personal/samba/class_sambaLogonHours.inc @@ -8,11 +8,13 @@ class sambaLogonHours extends plugin var $Matrix = array(); var $timezone = 0; var $config; + var $acl; - function sambaLogonHours (&$config, $dn, $slh) + function sambaLogonHours (&$config, $dn, $slh, $acl = 'rw') { plugin::plugin($config,$dn); $this->sambaLogonHours = $slh; + $this->acl = $acl; /* Get default timezone */ $zone = timezone::get_default_timezone(); @@ -64,8 +66,7 @@ class sambaLogonHours extends plugin $ui =get_userinfo(); $smarty = get_smarty(); - $acl = $ui->get_permissions($this->dn,"users/sambaAccount","sambaLogonHours"); - $smarty->assign("acl",preg_match("/w/i",$acl)); + $smarty->assign("acl",preg_match("/w/i",$this->acl)); $hours = array(); for($i = 0 ; $i <24 ; $i++ ){