summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d6afe9c)
raw | patch | inline | side by side (parent: d6afe9c)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 22 Mar 2010 10:45:39 +0000 (10:45 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 22 Mar 2010 10:45:39 +0000 (10:45 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16987 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/mail/admin/systems/services/spam/class_goSpamServer.inc b/gosa-plugins/mail/admin/systems/services/spam/class_goSpamServer.inc
index 2967a40e99509e6511f62b1c31b8a9951f6e7767..892607e9b5e4fa7667aa89701f358850db8de57d 100644 (file)
/* Add a new rule */
if(isset($_POST['AddRule']) && $this->acl_is_writeable("saRule")){
$this->dialog = new goSpamServerRule($this->config,$this->dn);
+ $this->dialog->acl_base = $this->acl_base;
+ $this->dialog->acl_category = $this->acl_category;
}
/* Cancel adding/editing specified rule */
$rule = $this->Rules[$entry];
$name = $entry;
$this->dialog = new goSpamServerRule($this->config,$this->dn,$name,$rule);
+ $this->dialog->acl_base = $this->acl_base;
+ $this->dialog->acl_category = $this->acl_category;
}
if(preg_match("/^delRule_/",$name) && $once && $this->acl_is_writeable("saRule")){
$once = false;
diff --git a/gosa-plugins/mail/admin/systems/services/spam/class_goSpamServerRule.inc b/gosa-plugins/mail/admin/systems/services/spam/class_goSpamServerRule.inc
index ba5673db5085c5e2c055954b71104912fd04f662..9ffa19088635f7ecd069c3a42aa4d1b3aef69b22 100644 (file)
}
}
+ function acl_is_writeable($attribute,$skip_write = FALSE)
+ {
+ if($this->read_only) return(FALSE);
+ $ui= get_userinfo();
+ return preg_match('/w/', $ui->get_permissions($this->acl_base, $this->acl_category."gospamserver", $attribute, $skip_write));
+ }
function save()
{
diff --git a/gosa-plugins/mail/admin/systems/services/spam/goSpamServer.tpl b/gosa-plugins/mail/admin/systems/services/spam/goSpamServer.tpl
index b125032614d73669eceb77b422909b7ea2826a8d..9699efffbb639b6df98e8cd4bc302e48fea5cb74 100644 (file)
-<table style='width:100%'>
+
+<table style='width:100%' summary="{t}Spam taggin{/t}">
<tr>
<td style='width:50%;'>
-<h3>Spam tagging</h3>
-
- <table>
+ <h3>{t}Spam tagging{/t}</h3>
+ <table summary="{t}Spam taggin{/t}">
<tr>
+ <td>{t}Rewrite header{/t}</td>
<td>
- {t}Rewrite header{/t}
- </td>
- <td>
-{render acl=$saRewriteHeaderACL}
- <input type='text' name='saRewriteHeader' value='{$saRewriteHeader}'>
-{/render}
+ {render acl=$saRewriteHeaderACL}
+ <input type='text' name='saRewriteHeader' value='{$saRewriteHeader}'>
+ {/render}
</td>
</tr>
<tr>
+ <td>{t}Required score{/t}</td>
<td>
- {t}Required score{/t}
- </td>
- <td>
-{render acl=$saRequiredScoreACL}
- <select name='saRequiredScore' title='{t}Select required score to tag mail as spam{/t}' size=1>
- {html_options options=$SpamScore selected=$saRequiredScore}
- </select>
-{/render}
+ {render acl=$saRequiredScoreACL}
+ <select name='saRequiredScore' title='{t}Select required score to tag mail as spam{/t}' size=1>
+ {html_options options=$SpamScore selected=$saRequiredScore}
+ </select>
+ {/render}
</td>
</tr>
</table>
-
</td>
<td class='left-border'>
-<h3>Trusted networks</h3>
+
+ <h3>Trusted networks</h3>
- <table width='100%'>
+ <table width='100%' summary="{t}Network settings{/t}">
<tr>
<td>
-{render acl=$saTrustedNetworksACL}
- <select name='TrustedNetworks[]' size=4 style='width:100%;' multiple>
- {html_options options=$TrustedNetworks}
- </select><br>
-{/render}
-{render acl=$saTrustedNetworksACL}
- <input type='text' name='NewTrustName' value=''>
-{/render}
-{render acl=$saTrustedNetworksACL}
- <button type='submit' name='AddNewTrust'>{msgPool type=addButton}</button>
-
-{/render}
-{render acl=$saTrustedNetworksACL}
- <button type='submit' name='DelTrust'>{t}Remove{/t}</button>
-
-{/render}
+ {render acl=$saTrustedNetworksACL}
+ <select name='TrustedNetworks[]' size=4 style='width:100%;' multiple>
+ {html_options options=$TrustedNetworks}
+ </select>
+ <br>
+ {/render}
+ {render acl=$saTrustedNetworksACL}
+ <input type='text' name='NewTrustName' value=''>
+ {/render}
+ {render acl=$saTrustedNetworksACL}
+ <button type='submit' name='AddNewTrust'>{msgPool type=addButton}</button>
+ {/render}
+ {render acl=$saTrustedNetworksACL}
+ <button type='submit' name='DelTrust'>{t}Remove{/t}</button>
+ {/render}
</td>
</tr>
</table>
-
</td>
</tr>
<tr>
</tr>
<tr>
<td>
- <h3>Flags</h3>
-
- <table>
+ <h3>{t}Flags{/t}</h3>
+ <table summary="{t}Flags{/t}">
<tr>
<td>
-{render acl=$saFlagsBACL}
- <input type='checkbox' name='saFlagsB' value='1' {$saFlagsBCHK}> {t}Enable use of bayes filtering{/t}<br>
-{/render}
-{render acl=$saFlagsbACL}
- <input type='checkbox' name='saFlagsb' value='1' {$saFlagsbCHK}> {t}Enable bayes auto learning{/t}<br>
-{/render}
-{render acl=$saFlagsCACL}
- <input type='checkbox' name='saFlagsC' value='1' {$saFlagsCCHK}> {t}Enable RBL checks{/t}
-{/render}
+ {render acl=$saFlagsBACL}
+ <input type='checkbox' name='saFlagsB' value='1' {$saFlagsBCHK}> {t}Enable use of bayes filtering{/t}
+ {/render}
+ <br>
+ {render acl=$saFlagsbACL}
+ <input type='checkbox' name='saFlagsb' value='1' {$saFlagsbCHK}> {t}Enable bayes auto learning{/t}
+ {/render}
+ <br>
+ {render acl=$saFlagsCACL}
+ <input type='checkbox' name='saFlagsC' value='1' {$saFlagsCCHK}> {t}Enable RBL checks{/t}
+ {/render}
</td>
</tr>
</table>
</td>
<td class='left-border'>
-
- <table>
+ <table summary="{t}Flags{/t}">
<tr>
<td>
-{render acl=$saFlagsRACL}
- <input type='checkbox' name='saFlagsR' value='1' {$saFlagsRCHK}> {t}Enable use of Razor{/t}<br>
-{/render}
-{render acl=$saFlagsDACL}
- <input type='checkbox' name='saFlagsD' value='1' {$saFlagsDCHK}> {t}Enable use of DDC{/t}<br>
-{/render}
-{render acl=$saFlagsPACL}
- <input type='checkbox' name='saFlagsP' value='1' {$saFlagsPCHK}> {t}Enable use of Pyzor{/t}
-{/render}
+ {render acl=$saFlagsRACL}
+ <input type='checkbox' name='saFlagsR' value='1' {$saFlagsRCHK}> {t}Enable use of Razor{/t}
+ {/render}
+ <br>
+ {render acl=$saFlagsDACL}
+ <input type='checkbox' name='saFlagsD' value='1' {$saFlagsDCHK}> {t}Enable use of DDC{/t}
+ {/render}
+ <br>
+ {render acl=$saFlagsPACL}
+ <input type='checkbox' name='saFlagsP' value='1' {$saFlagsPCHK}> {t}Enable use of Pyzor{/t}
+ {/render}
</td>
</tr>
</table>
-
</td>
</tr>
<tr>
</td>
</tr>
<tr>
- <td colspan='2'><h3>Rules</h3>
+ <td colspan='2'>
+ <h3>{t}Rules{/t}</h3>
- <table width='100%'>
+ <table width='100%' summary="{t}Rules{/t}">
<tr>
<td>
- {$divRules}<br>
-{render acl=$saTrustedNetworksACL}
- <button type='submit' name='AddRule'>{msgPool type=addButton}</button>
-
-{/render}
+ {$divRules}
+ <br>
+ {render acl=$saTrustedNetworksACL}
+ <button type='submit' name='AddRule'>{msgPool type=addButton}</button>
+ {/render}
</td>
</tr>
</table>
</td>
+ </tr>
</table>
+
<input type='hidden' value='1' name='goSpamServer'>
<hr>
-<div style="width:100%; text-align:right;padding-top:10px;padding-bottom:3px;">
- <button type='submit' name='SaveService'>{msgPool type=saveButton}</button>
-
-
- <button type='submit' name='CancelService'>{msgPool type=cancelButton}</button>
+<div class="plugin-actions">
+ <button type='submit' name='SaveService'>{msgPool type=saveButton}</button>
+ <button type='submit' name='CancelService'>{msgPool type=cancelButton}</button>
</div>
-
diff --git a/gosa-plugins/mail/admin/systems/services/spam/goSpamServerRule.tpl b/gosa-plugins/mail/admin/systems/services/spam/goSpamServerRule.tpl
index 1850933d2b62d00a1ffe5233d07a4194870085b2..4131b2729e0415b900fccc8301086c5fc79115d8 100644 (file)
-<h3>Edit spam rule</h3>
+<p>
+{t}Name{/t}
+<input type='text' name='name' value='{$name}' >
+</p>
-<table style='width:100%;'>
- <tr>
- <td width='70'>
- {t}Name{/t}
- </td>
- <td>
- <input type='text' name='name' value='{$name}' >
- </td>
- </tr>
- <tr>
- <td colspan=2>
- {t}Rule{/t}
- <textarea name='rule' style='width:100%;'>{$rule}</textarea>
- </td>
- </tr>
-</table>
<hr>
-<div style="width:100%; text-align:right;padding-top:10px;padding-bottom:3px;">
- <button type='submit' name='SaveRule'>{msgPool type=saveButton}</button>
-
- <button type='submit' name='CancelRule'>{msgPool type=cancelButton}</button>
+<h3>{t}Rule{/t}</h3>
+<textarea name='rule' style='width:100%;'>{$rule}</textarea>
+<hr>
+<div style="width:100%; text-align:right;padding-top:10px;padding-bottom:3px;">
+ <button type='submit' name='SaveRule'>
+ {msgPool type=saveButton}</button>
+ <button type='submit' name='CancelRule'>
+ {msgPool type=cancelButton}</button>
</div>
-