summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b8ffeb3)
raw | patch | inline | side by side (parent: b8ffeb3)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 11 Jul 2008 13:12:46 +0000 (13:12 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 11 Jul 2008 13:12:46 +0000 (13:12 +0000) |
- 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
- 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 d1389d8be80b00911a901860d302220aa7fc8019..ea8c8da32d0503e76eeace003648f89e2f905710 100644 (file)
$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);
}
$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 e3cc51d3466ecdbc7889d5bcf63f49a9bf9f91cb..d37cd2e64492db3e8c319b9c13fd61d600479391 100644 (file)
$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 6eb885c7f91629e30340831064017fa29d8d1720..59f48fc2b4314e6b5e4c469253a915245c6c7e64 100644 (file)
}
$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.= "<p class=\"plugbottom\">";
/* Are we in edit mode? */
diff --git a/gosa-plugins/samba/personal/samba/sambaLogonHours.tpl b/gosa-plugins/samba/personal/samba/sambaLogonHours.tpl
index 3f5ab3029b49907eb7182bbd521be727492a698b..c348545b13942ec102260f7928307a8a28fc7be2 100644 (file)
-
+{if $acl}
<!-- Javacript function used to switch a complete row or col of selected hours -->
<script language="javascript" type="text/javascript">
{literal}
}
{/literal}
</script>
+{/if}
<h1>{t}Specify the hours this user is allowed to log in{/t}</h1>
<br>
{/foreach}
</tr>
+{if $acl}
<!-- Add toggle buttons for hours -->
<tr>
<td style='text-align: left;' class='list0'>
</td>
{/foreach}
<td>
-
<input type='button' onClick="toggle_chk('^day_[0-9]*_[0-9]*$');" value='+/-' style='width:100%;'>
</td>
</tr>
+{/if}
<!-- Add Entries -->
{foreach from=$Matrix item=days key=key_day}
{else}
<td style="text-align:center;height: 22px; background-color: rgb(245, 245, 245); border-right: solid 1px;">
{/if}
- {if $Matrix[$key_day].$key_hour}
- <input id='day_{$key_day}_{$key_hour}' type='checkbox' name='day_{$key_day}_{$key_hour}' checked >
- {else}
- <input id='day_{$key_day}_{$key_hour}' type='checkbox' name='day_{$key_day}_{$key_hour}' >
- {/if}
+ <input type='checkbox'
+ {if $acl} id='day_{$key_day}_{$key_hour}' name='day_{$key_day}_{$key_hour}' {/if}
+ {if $Matrix[$key_day].$key_hour} checked {/if}
+ {if !$acl} disabled {/if}>
</td>
{/foreach}
+{if $acl}
<!-- Add toggle button for days -->
<td>
<input type='button' onClick="toggle_chk('^day_{$key_day}_[0-9]*$')" value='+/-' style='padding:0px;margin:0px;'>
</td>
+{/if}
</tr>
{/foreach}
</table>
<input type='hidden' name='sambaLogonHoursPosted' value='1'>
<br>
<p class="plugbottom">
+{if $acl}
<input type=submit name="save_logonHours" value="{msgPool type=saveButton}">
+{/if}
<input type=submit name="cancel_logonHours" value="{msgPool type=cancelButton}">
</p>