X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fgofax%2Fblocklists%2Fclass_blocklistManagement.inc;h=9b946ee97cce5792d6b571dd05d4f497d11cd463;hb=5d0f48602651da43514bff253b037394b308b25e;hp=93d8010e3d9d14fc6793f96dcc87decfe686ad5e;hpb=f621bf6a9170ea3aacbf5ed1380350ee0ef74fb8;p=gosa.git diff --git a/plugins/gofax/blocklists/class_blocklistManagement.inc b/plugins/gofax/blocklists/class_blocklistManagement.inc index 93d8010e3..9b946ee97 100644 --- a/plugins/gofax/blocklists/class_blocklistManagement.inc +++ b/plugins/gofax/blocklists/class_blocklistManagement.inc @@ -29,10 +29,6 @@ class blocklist extends plugin $this->dn = ""; $this->config = $config; - $ui = get_userinfo(); - $acl = get_permissions ($ui->dn, $ui->subtreeACL); - $this->acl = get_module_permission($acl, "blocklists", $ui->dn); - $this->DivListBlocklist = new divListBlocklist($this->config,$this); } @@ -383,11 +379,11 @@ class blocklist extends plugin /* Create filter */ if ($ShowSendBocklists){ $filter = "(&(objectClass=goFaxSBlock)(|(cn=".$Regex.")(goFaxSBlocklist=".$Regex.")))"; - $res= get_list($filter, $this->ui->subtreeACL, $base,array("*"), $Flags); + $res= get_list($filter, "gofax", $base,array("*"), $Flags); } if ($ShowReceiveBlocklists){ $filter2= "(&(objectClass=goFaxRBlock)(|(cn=".$Regex.")(goFaxRBlocklist=".$Regex.")))"; - $res2= get_list($filter2, $this->ui->subtreeACL, $base,array("*"), $Flags); + $res2= get_list($filter2, "gofax", $base,array("*"), $Flags); } $this->blocklists = array_merge($res,$res2); @@ -410,7 +406,7 @@ class blocklist extends plugin { $ldap= $this->config->get_ldap_link(); $ldap->rmDir($this->dn); - show_ldap_error($ldap->get_error(), _("Removing blocklist object failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Removing of blocklist with dn '%s' failed."),$this->dn)); $this->clear_fields(); $this->handle_post_events("remove"); } @@ -430,6 +426,9 @@ class blocklist extends plugin $this->$attr = $_POST[$attr]; } } + if(isset($_POST['type'])){ + $this->type = $_POST['type']; + } } @@ -518,7 +517,7 @@ class blocklist extends plugin $ldap->add($this->attrs); $this->handle_post_events("add"); } - show_ldap_error($ldap->get_error(), _("Saving blocklist object failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of blocklist with dn '%s' failed."),$this->dn)); } @@ -553,6 +552,30 @@ class blocklist extends plugin } } + /* Return plugin informations for acl handling */ + function plInfo() + { + return (array( + "plShortName" => _("Fax"), + "plDescription" => _("Fax Blocklists"), + "plSelfModify" => TRUE, + "plDepends" => array(), + + "plPriority" => 0, + "plSection" => array("administration" => _("FAX Blocklists")), + "plCategory" => array("gofax" => array("description" => _("Fax"), + "objectClass" => array("goFaxRBlock","goFaxSBlock"))), + + + + "plProvidedAcls" => array( + "cn" => _("Name"), + "description" => _("Description"), + "base" => _("Base"), + "type" => _("Blocklist type")) + )); + } + } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?>