summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b851904)
raw | patch | inline | side by side (parent: b851904)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 5 Dec 2006 10:42:10 +0000 (10:42 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 5 Dec 2006 10:42:10 +0000 (10:42 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5305 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/gofax/blocklists/class_blocklistManagement.inc b/plugins/gofax/blocklists/class_blocklistManagement.inc
index c5b08286bb9a660da5f8f7155157428fb24fe4a8..5c81d030ad0de3e8943dd0e89345b4afbab98acb 100644 (file)
$dn = "cn=dummy,ou=gofax,ou=systems,".$this->base;
}
- $this->set_acl_category("gofax");
+ $this->set_acl_category("gofaxlist");
$this->set_acl_base($dn);
/* Create filter */
if ($ShowSendBocklists){
$filter = "(&(objectClass=goFaxSBlock)(|(cn=".$Regex.")(goFaxSBlocklist=".$Regex.")))";
- $res= get_list($filter, "gofax", $base,array("*"), $Flags);
+ $res= get_list($filter, "gofaxlist", $base,array("*"), $Flags);
}
if ($ShowReceiveBlocklists){
$filter2= "(&(objectClass=goFaxRBlock)(|(cn=".$Regex.")(goFaxRBlocklist=".$Regex.")))";
- $res2= get_list($filter2, "gofax", $base,array("*"), $Flags);
+ $res2= get_list($filter2, "gofaxlist", $base,array("*"), $Flags);
}
$this->blocklists = array_merge($res,$res2);
$tmp=array();
foreach($this->blocklists as $tkey => $val ){
- $acl = $this->ui ->get_permissions($base,"gofax/blocklist");
+ $acl = $this->ui ->get_permissions($base,"gofaxlist/blocklist");
if(preg_match("/r/",$acl)){
$tmp[strtolower($val['cn'][0]).$val['cn'][0]]=$val;
}
{
return (array(
"plShortName" => _("Fax"),
- "plDescription" => _("Fax Blocklists"),
+ "plDescription" => _("Fax blocklists"),
"plSelfModify" => FALSE,
"plDepends" => array(),
"plPriority" => 0,
"plSection" => array("administration" => _("FAX Blocklists")),
- "plCategory" => array("gofax" => array("description" => _("Fax"),
+ "plCategory" => array("gofaxlist" => array("description" => _("Fax blocklists"),
"objectClass" => array("goFaxRBlock","goFaxSBlock"))),
"plProvidedAcls" => array(
"cn" => _("Name"),
diff --git a/plugins/gofax/blocklists/class_divListBlocklists.inc b/plugins/gofax/blocklists/class_divListBlocklists.inc
index ecf2fdbd107d74ffceeb87ed2b7a7f4baebc0aee..3ff00fa8aa2508b73f21a3ad388179222db1cbf2 100755 (executable)
function divListBlocklist ($config,$parent)
{
- MultiSelectWindow::MultiSelectWindow($config, "Blocklists", "gofax");
+ MultiSelectWindow::MultiSelectWindow($config, "Blocklists", "gofaxlist");
$this->parent = $parent;
$this->ui = get_userinfo();
$this->AddRegex ("Regex", _("Regular expression for matching list names"),"*" , true);
}
+
function GenHeader()
{
/* Prepare departments,
/* Get all departments within this subtree */
$base = $this->config->current['BASE'];
-
$deps= get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base,
array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH);
/* Load possible departments */
$ui= get_userinfo();
- $tdeps= $ui->get_module_departments("gofax");
-
+ $tdeps= $ui->get_module_departments("gofaxlist");
$ids = $this->config->idepartments;
-
foreach($deps as $dep){
if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $tdeps)){
-
$value = $ids[$dep['dn']];
if ($this->selectedBase == $dep['dn']){
$options.= "<option selected='selected' value='".$dep['dn']."'>$value</option>";
}
}
- $ui = get_userinfo();
- $acl = $ui->get_permissions($this->selectedBase,"gofax/blocklist");
+ /* Get acls */
+ $ui = get_userinfo();
+ $acl = $ui->get_permissions($this->selectedBase,"gofaxlist/blocklist");
+ $acl_all = $ui->has_complete_category_acls($this->selectedBase,"gofaxlist");
/* NEW LIST MANAGMENT */
$listhead = "<div style='background:#F0F0F9;padding:5px;'>".
" <input class='center' type='image' src='images/list_reload.png' align='middle'
title='"._("Reload list")."' name='submit_department' alt='". _("Submit")."'> ".
" <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> ";
- $listhead .= $this->get_snapshot_header($this->selectedBase);
+ /* Add snaphot icons, if allowed */
+ if(preg_match("/(c.*w|w.*c)/",$acl_all)){
+ $listhead .= $this->get_snapshot_header($this->selectedBase);
+ }
+
+ /* Add create icon if allowed */
if(preg_match("/c/",$acl)){
$listhead .= " <input class='center' type='image' align='middle' src='images/list_new_blocklist.png' ".
" title='"._("Create new blocklist")."' alt='"._("New Blocklist")."' name='user_new'> ".
" <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'>";
}
+ /* Append department selector */
$listhead .= " "._("Base")." <select name='CurrentMainBase' onChange='mainform.submit()' class='center'>$options</select>".
" <input class='center' type='image' src='images/list_submit.png' align='middle'
title='"._("Submit department")."' name='submit_department' alt='"._("Submit")."'> ".
$ui = get_userinfo();
foreach($list as $key => $val){
- $acl = $ui->get_permissions($val['dn'],"gofax/blocklist");
+ $acl = $ui->get_permissions($val['dn'],"gofaxlist/blocklist");
if(!preg_match("/r/",$acl)){
continue;
}
index 7c3f1158abdd3c4731aa17cb86e62534d78ed3a3..888339abe55150849e4d9e002084994ad7a8aa71 100644 (file)
{/render}
<br>
{render acl=$goFaxBlocklistACL}
- <input id="number" name="number" size=25 maxlength=60 {$goFaxBlocklistACL}>
+ <input id="number" name="number" size=25 maxlength=60 >
{/render}
{render acl=$goFaxBlocklistACL}
- <input type=submit value="{t}Add{/t}" {$goFaxBlocklistACL} name="add_number">
+ <input type=submit value="{t}Add{/t}" name="add_number">
{/render}
{render acl=$goFaxBlocklistACL}
- <input type=submit value="{t}Delete{/t}" {$goFaxBlocklistACL} name="delete_number">
+ <input type=submit value="{t}Delete{/t}" name="delete_number">
{/render}
</td>
<td style="border-left:1px solid #A0A0A0">
diff --git a/plugins/gofax/faxreports/class_faxreport.inc b/plugins/gofax/faxreports/class_faxreport.inc
index bed39e0caee5c4b3a6e02449e6121d1f4a7bf4bb..4b892b5d5fcb5507a2da161115eedcde7e761d80 100644 (file)
$fax_uids = array_flip($this->fax_users);
$uid = $line['uid'];
$dn = $fax_uids[$uid];
- $acls = $this->ui->get_permissions($dn,"gofax/faxreport");
+ $acls = $this->ui->get_permissions($dn,"faxreport/faxreport");
if(!preg_match("/r/",$acls)){
print_red (_("You have no permission to retrieve informations about this fax id!"));
return($smarty->fetch(get_template_path('contents.tpl', TRUE)));
$final="fax_$vname";
if($vname != "uid"){
- $v_acl = $this->ui->get_permissions($dn,"gofax/faxreport",preg_replace("/_/","",$vname));
+ $v_acl = $this->ui->get_permissions($dn,"faxreport/faxreport",preg_replace("/_/","",$vname));
}else{
$v_acl = "r";
}
/* Hide restricted attributes */
foreach(array("pages","receiverid","senderid","status","queuingtime","detailedView") as $attr){
$var = $attr."ACL";
- $$var = $this->ui->get_permissions($dn,"gofax/faxreport",$attr);
+ $$var = $this->ui->get_permissions($dn,"faxreport/faxreport",$attr);
}
/* Restricted attributes will not be displayed, this will be displayed instead */
"plDepends" => array(),
"plPriority" => 1, // Position in tabs
"plSection" => array("administration"), // This belongs to personal
- "plCategory" => array("gofax"),
+ "plCategory" => array("faxreport" => array("description" => _("Fax reports"),
+ "objectClass" => array())),
"plOptions" => array(),
"plProvidedAcls" => array(