summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 074f7f4)
raw | patch | inline | side by side (parent: 074f7f4)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 2 Dec 2005 10:55:04 +0000 (10:55 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 2 Dec 2005 10:55:04 +0000 (10:55 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2203 594d385d-05f5-0310-b6e9-bd551577e9d8
index 2413e2205133b138a0b028db361148a13585cd73..54a5e2dd4b0f9c988d4c47b36f47bc1914e13cab 100644 (file)
"gosaMailForwardingAddress");
$ACLD['blocklists']= array("cn",
"create",
+ "type",
+ "delete",
"description",
"goFaxBlocklist");
$ACLD['group']= array("cn",
diff --git a/plugins/gofax/blocklists/class_blocklistManagement.inc b/plugins/gofax/blocklists/class_blocklistManagement.inc
index d77bf2b4efa42ec520f3f90a3484ad8a6cc47683..e9c5e01ab693ae790fe7e5ccb397b6df87cb6d60 100644 (file)
/* Get global filter config */
if (!is_global("blockfilter")){
- $uii= get_userinfo();
+ $ui= get_userinfo();
$base= get_base_from_people($ui->dn);
$blockfilter= array("sendlists" => "checked",
"receivelists" => "checked",
$blockfilter = $_SESSION["blockfilter"];
$this->base = $blockfilter['depselect'];
}
+ $ui= get_userinfo();
+ $acl= get_permissions ($ui->dn, $ui->subtreeACL);
+ $this->acl= get_module_permission($acl, "blocklists", $ui->dn);
}
function execute()
/* Create new blocklist? */
if ($s_action=="new"){
$this->clear_fields();
- $this->acl= "#all#";
$this->dn= "new";
plugin::plugin ($this->config, $this->dn);
}
if ($s_action=="edit"){
$this->clear_fields();
$this->dn=$this->blocklists[$s_entry]['dn'];
- $this->acl= get_permissions ($this->dn, $this->ui->subtreeACL);
- $this->acl= get_module_permission($this->acl, "blocklists", $this->dn);
plugin::plugin ($this->config, $this->dn);
/* Load missing lists */
/* Finally delete blocklist */
if (isset($_POST['delete_blocklist_confirm'])){
- $acl= get_permissions ($this->dn, $this->ui->subtreeACL);
- $acl= get_module_permission($acl, "blocklists", $this->dn);
- if (chkacl($acl, "all") == ""){
+ if (chkacl($this->acl, "delete") == ""){
$this->remove_from_parent();
gosa_log ("Blocklist object'".$this->dn."' has been removed");
$this->reload ();
$this->save ();
gosa_log ("Blocklist object'".$this->dn."' has been saved");
- $this->acl= "#none#";
$this->dn= "";
del_lock ($this->ui->dn);
unset($_SESSION['objectinfo']);
$this->cn= "";
$this->base= "";
$this->goFaxBlocklist= array();
- $this->acl= "#none#";
}
function reload()
{
plugin::save_object();
- /* Save type, needed to detect objectClass */
- if (isset($_POST['type']) && chkacl($this->acl, "cn") == ""){
- $this->type= $_POST['type'];
- }
-
- /* Save base, since this is no LDAP attribute */
- if (isset($_POST['base']) && chkacl($this->acl, "create") == ""){
- $this->base= $_POST['base'];
+ foreach($this->attributes as $attr){
+ if(isset($_POST[$attr])){
+ $this->$attr = $_POST[$attr];
+ }
}
}
-
/* Check values */
function check()
{
$new_dn= $this->dn;
}
- $ui= get_userinfo();
- $acl= get_permissions ($new_dn, $ui->subtreeACL);
- $acl= get_module_permission($acl, "blocklist", $new_dn);
- if (chkacl($acl, "create") != ""){
+ if (chkacl($this->acl, "create") != ""){
$message[]= _("You have no permissions to create a blocklist on this 'Base'.");
}
index d2e80aae030021ca9651cd112df406b3cc2ca6bb..b3337d9db5569e71d7a3200b12a1848bfbf1bb9d 100644 (file)
<tr>
<td><LABEL for="type">{t}Type{/t}</LABEL></td>
<td>
- <select size="1" id="type" name="type" {$typeACL} title="{t}Select wether to filter incoming or outgoing calls{/t}">
+ <select size="1" id="type" name="type" {$goFaxBlocklistACL} title="{t}Select wether to filter incoming or outgoing calls{/t}">
{html_options options=$types selected=$type}
<option disabled> </option>
</select>