summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fea5059)
raw | patch | inline | side by side (parent: fea5059)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 3 May 2007 13:18:29 +0000 (13:18 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 3 May 2007 13:18:29 +0000 (13:18 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6254 594d385d-05f5-0310-b6e9-bd551577e9d8
include/sieve/class_sieveManagement.inc | patch | blob | history |
index 6ac3c6ee5237fc2230de1928526b45fa78c4eec2..b8edabbc1c03eefd5f5d68bc4dd8eb59f64760ab 100644 (file)
* import dialog opened.
*/
var $Import_Script = FALSE;
+ var $acl = "";
/* Initialize the class and load all sieve scripts
* try to parse them and display errors
*/
function sieveManagement($config,$dn,$parent,$uattrib)
{
+ /* Use mail Acls here */
+ $ui = get_userinfo();
+ $acl= get_permissions ($ui->dn, $ui->subtreeACL);
+ $this->acl= get_module_permission($acl, "mailAccount", $ui->dn);
+
/* Check given parameter */
if(!isset($parent->$uattrib)){
trigger_error("Sieve Management implementation error. Parameter 4 must be part of the given parent element.");
}
/* remove script requested */
- if(chkacl($this->parent->acl,"sieveManagement") == "" && preg_match("/^delscript_/",$name) && $once && !$this->current_handler){
+ if(chkacl($this->acl,"sieveManagement") == "" && preg_match("/^delscript_/",$name) && $once && !$this->current_handler){
$script = preg_replace("/^delscript_/","",$name);
$script = preg_replace("/_(x|y)/","",$script);
$once = FALSE;
}
/* Activate script */
- if(chkacl($this->parent->acl,"sieveManagement") == "" && preg_match("/^active_script_/",$name) && $once && !$this->current_handler){
+ if(chkacl($this->acl,"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(chkacl($this->parent->acl,"sieveManagement") == "" && isset($_POST['delete_script_confirm'])){
+ if(chkacl($this->acl,"sieveManagement") == "" && isset($_POST['delete_script_confirm'])){
$script = $this->scripts[$this->script_to_delete];
}
/* Save currently edited sieve script. */
- if(chkacl($this->parent->acl,"sieveManagement") == "" &&
+ if(chkacl($this->acl,"sieveManagement") == "" &&
isset($_POST['save_sieve_changes']) &&
is_object($this->current_handler)){
$chk = $this->current_handler->check();
$field3 = array("string" => $script['MSG']);
$field4 = array("string" => _("Script length").": ".strlen($script['SCRIPT']));
- if(chkacl($this->parent->acl,"sieveManagement") == ""){
+ if(chkacl($this->acl,"sieveManagement") == ""){
$del = "<input type='image' name='delscript_".$key."' src='images/edittrash.png'
title='"._("Remove script")."'>";
}else{
$del = "<img src='images/empty' alt=' '>";
}
- if($active || $script['IS_NEW'] || chkacl($this->parent->acl,"sieveManagement") != ""){
+ if($active || $script['IS_NEW'] || chkacl($this->acl,"sieveManagement") != ""){
$activate = "<img src='images/empty' alt=' '>";
}else{
$activate = "<input type='image' name='active_script_".$key."' src='images/true.png'