summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2eb6c67)
raw | patch | inline | side by side (parent: 2eb6c67)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 26 Mar 2007 08:21:47 +0000 (08:21 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 26 Mar 2007 08:21:47 +0000 (08:21 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5880 594d385d-05f5-0310-b6e9-bd551577e9d8
include/sieve/class_sieveManagement.inc | patch | blob | history | |
plugins/personal/mail/class_mailAccount.inc | patch | blob | history | |
plugins/personal/mail/generic.tpl | patch | blob | history |
index d5701e3bb87e96683df4ecd2b3bd8aec0621c8ef..da9a10978ede1fb058ddd512db582640f9d5b743 100644 (file)
}
/* remove script requested */
- if(preg_match("/^delscript_/",$name) && $once && !$this->current_handler){
+ if($this->parent->acl_is_writeable("sieveManagement") && preg_match("/^delscript_/",$name) && $once && !$this->current_handler){
$script = preg_replace("/^delscript_/","",$name);
$script = preg_replace("/_(x|y)/","",$script);
$once = FALSE;
-
$this->script_to_delete = $script;
}
/* Activate script */
- if(preg_match("/^active_script_/",$name) && $once && !$this->current_handler){
+ if($this->parent->acl_is_writeable("sieveManagement") && preg_match("/^active_script_/",$name) && $once && !$this->current_handler){
$script = preg_replace("/^active_script_/","",$name);
$script = preg_replace("/_(x|y)/","",$script);
$once = FALSE;
}
/* Remove confirmed */
- if(isset($_POST['delete_script_confirm'])){
+ if($this->parent->acl_is_writeable("sieveManagement") && isset($_POST['delete_script_confirm'])){
$script = $this->scripts[$this->script_to_delete];
}
/* Save currently edited sieve script. */
- if(isset($_POST['save_sieve_changes'])){
+ if($this->parent->acl_is_writeable("sieveManagement") && isset($_POST['save_sieve_changes'])){
$chk = $this->current_handler->check();
if(!count($chk)){
"attach" => "style='width:30px;'");
}
- if($active || $script['IS_NEW']){
- $field6 = array("string" => "<img src='images/empty.png' alt=' '>".
- "<input type='image' name='editscript_".$key."' src='images/edit.png'>".
- "<input type='image' name='delscript_".$key."' src='images/edittrash.png'>");
+ if($this->parent->acl_is_writeable("sieveManagement")){
+ $del = "<input type='image' name='delscript_".$key."' src='images/edittrash.png'>";
}else{
- $field6 = array("string" => "<input type='image' name='active_script_".$key."' src='images/true.png'>".
- "<input type='image' name='editscript_".$key."' src='images/edit.png'>".
- "<input type='image' name='delscript_".$key."' src='images/edittrash.png'>");
+ $del = "<img src='images/empty' alt=' '>";
}
+
+ if($active || $script['IS_NEW'] || !$this->parent->acl_is_writeable("sieveManagement")){
+ $activate = "<img src='images/empty' alt=' '>";
+ }else{
+ $activate = "<input type='image' name='active_script_".$key."' src='images/true.png'>";
+ }
+
+ $field6 = array("string" => $activate."<input type='image' name='editscript_".$key."' src='images/edit.png'>".$del);
$List ->AddEntry(array($field1,$field2,$field3,$field4,$field5,$field6));
}
diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc
index da82a9423ee78652715d5221a47b99bd43a44a5e..ff796593ea991926123fa94c8f80c61f3ff0a3e6 100644 (file)
/*
* Sieve Management
*/
- if(isset($_POST['sieveManagement']) && preg_match("/C/",$this->gosaMailDeliveryMode)) {
+ if(isset($_POST['sieveManagement'])
+ && preg_match("/C/",$this->gosaMailDeliveryMode)
+ && $this->acl_is_writeable("sieveManagement")) {
$this->dialog = new sieveManagement($this->config,$this->dn,$this);
}
$smarty->assign("mailACL", preg_replace("/w/","",$this->getacl("mail",$SkipWrite)));
}
- if (preg_match('/V/', $this->gosaMailDeliveryMode)){
+ /* Disable/Enable range select, but do not disable them twice
+ * if they are already diabled by "use own sieve script"
+ */
+ if (preg_match('/V/', $this->gosaMailDeliveryMode) || preg_match("/C/",$this->gosaMailDeliveryMode)){
$smarty->assign('rangeEnabled', "");
} else {
$smarty->assign('rangeEnabled', "disabled");
"gosaSpamSortLevel" => _("Spam level"),
"gosaSpamMailbox" => _("Spam mail box"),
+ "sieveManagement" => _("Sieve manamgent"),
+
"gosaMailDeliveryModeR" => _("Reject due to mailsize"), // This is flag of gosaMailDeliveryMode
"gosaMailMaxSize" => _("Mail max size"),
index 51e424fa228246ecad82c2c34f62c91af3bb00bd..12bc8b1755cbb7eb36b731c42958cab393521d9f 100644 (file)
</td>
</tr>
<tr>
- <td>
+ <td>
+{render acl=$sieveManagementACL}
<input {if $own_script == ""} disabled {/if} id='sieveManagement' type='submit' name='sieveManagement' value='{t}Sieve Management{/t}'>
+{/render}
</td>
</tr>
</table>