From: hickert Date: Fri, 11 Jul 2008 13:12:46 +0000 (+0000) Subject: Updated sambaAccount X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b547c9108374d1a88bf0e45e07b0d233d5c101c4;p=gosa.git Updated sambaAccount - Do not display plugins save button if we have a dialog open. - Fixed ACLs for sambaLogonHours. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11610 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 d1389d8be..ea8c8da32 100644 --- a/gosa-plugins/samba/personal/samba/class_sambaAccount.inc +++ b/gosa-plugins/samba/personal/samba/class_sambaAccount.inc @@ -250,7 +250,7 @@ class sambaAccount extends plugin $SkipWrite = (!isset($this->parent) || !$this->parent) && !session::is_set('edit'); /* Open Samaba Logong hours dialog */ - if(isset($_POST['SetSambaLogonHours']) && $this->samba3 && $this->acl_is_writeable("sambaLogonHours")){ + if(isset($_POST['SetSambaLogonHours']) && $this->samba3 && $this->acl_is_readable("sambaLogonHours")){ $this->dialog = new sambaLogonHours($this->config,$this->dn,$this->sambaLogonHours); } @@ -282,6 +282,10 @@ class sambaAccount extends plugin $smarty->assign($var."ACL",$this->getacl($var,$SkipWrite)); } + if(!session::is_set('edit')){ + $smarty->assign("sambaLogonHoursACL",""); + } + if ($this->sambaPwdMustChange=="0"){ $date= getdate(); } else { diff --git a/gosa-plugins/samba/personal/samba/class_sambaLogonHours.inc b/gosa-plugins/samba/personal/samba/class_sambaLogonHours.inc index e3cc51d34..d37cd2e64 100644 --- a/gosa-plugins/samba/personal/samba/class_sambaLogonHours.inc +++ b/gosa-plugins/samba/personal/samba/class_sambaLogonHours.inc @@ -60,13 +60,16 @@ class sambaLogonHours extends plugin $week_days = msgPool::weekdays(); + $ui =get_userinfo(); + $smarty = get_smarty(); + $acl = $ui->get_permissions($this->dn,"users/sambaAccount","sambaLogonHours"); + $smarty->assign("acl",preg_match("/w/i",$acl)); + $hours = array(); for($i = 0 ; $i <24 ; $i++ ){ $hours[$i] = $i ; } - $ui =get_userinfo(); - $smarty = get_smarty(); $smarty->assign("Matrix",$this->Matrix); $smarty->assign("Days" ,$week_days); $smarty->assign("Hours" ,$hours); diff --git a/gosa-plugins/samba/personal/samba/main.inc b/gosa-plugins/samba/personal/samba/main.inc index 6eb885c7f..59f48fc2b 100644 --- a/gosa-plugins/samba/personal/samba/main.inc +++ b/gosa-plugins/samba/personal/samba/main.inc @@ -96,7 +96,7 @@ if (!$remove_lock){ } $info= ""; - if (($sambaAccount->is_account) && (!$sambaAccount->show_ws_dialog) && empty($lock_msg)){ + if (($sambaAccount->is_account) && (!$sambaAccount->dialog) && (!$sambaAccount->show_ws_dialog) && empty($lock_msg)){ $display.= "

"; /* Are we in edit mode? */ diff --git a/gosa-plugins/samba/personal/samba/sambaLogonHours.tpl b/gosa-plugins/samba/personal/samba/sambaLogonHours.tpl index 3f5ab3029..c348545b1 100644 --- a/gosa-plugins/samba/personal/samba/sambaLogonHours.tpl +++ b/gosa-plugins/samba/personal/samba/sambaLogonHours.tpl @@ -1,4 +1,4 @@ - +{if $acl} +{/if}

{t}Specify the hours this user is allowed to log in{/t}


@@ -39,6 +40,7 @@ {/foreach} +{if $acl} @@ -55,10 +57,10 @@ {/foreach} - +{/if} {foreach from=$Matrix item=days key=key_day} @@ -72,18 +74,19 @@ {else} {/if} - {if $Matrix[$key_day].$key_hour} - - {else} - - {/if} + {/foreach} +{if $acl} +{/if} {/foreach} @@ -91,8 +94,10 @@

+{if $acl}   +{/if}