From d45d43d3325f1a5f443d211a1db403d8fe736088 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 9 Aug 2006 04:55:20 +0000 Subject: [PATCH] Some fixes for gofax account git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4428 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/gofax/faxaccount/class_gofaxAccount.inc | 2 +- plugins/gofax/faxaccount/generic.tpl | 2 +- plugins/gofax/faxaccount/main.inc | 17 +++++------------ 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/plugins/gofax/faxaccount/class_gofaxAccount.inc b/plugins/gofax/faxaccount/class_gofaxAccount.inc index 5aa2b8bc2..34e3fb729 100644 --- a/plugins/gofax/faxaccount/class_gofaxAccount.inc +++ b/plugins/gofax/faxaccount/class_gofaxAccount.inc @@ -58,7 +58,7 @@ class gofaxAccount extends plugin if ($dn != "new"){ /* Get arrays */ - foreach (array("goFaxRBlocklist", "goFaxRBlockgroups", "goFaxSBlocklist","facsimileTelephoneNumber", + foreach (array("goFaxRBlocklist", "goFaxRBlockgroups", "goFaxSBlocklist", "goFaxSBlockgroups", "facsimileAlternateTelephoneNumber") as $val){ $this->$val =array(); if (isset($this->attrs["$val"]["count"])){ diff --git a/plugins/gofax/faxaccount/generic.tpl b/plugins/gofax/faxaccount/generic.tpl index 93deffd42..01a528289 100644 --- a/plugins/gofax/faxaccount/generic.tpl +++ b/plugins/gofax/faxaccount/generic.tpl @@ -11,7 +11,7 @@ {render acl=$facsimileTelephoneNumberACL} - {/render} diff --git a/plugins/gofax/faxaccount/main.inc b/plugins/gofax/faxaccount/main.inc index 1227dd74b..ab20ed675 100644 --- a/plugins/gofax/faxaccount/main.inc +++ b/plugins/gofax/faxaccount/main.inc @@ -13,6 +13,9 @@ if (!$remove_lock){ /* Create gofaxAccount object on demand */ if (!isset($_SESSION['gofaxAccount']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ $_SESSION['gofaxAccount']= new gofaxAccount ($config, $ui->dn); + $_SESSION['gofaxAccount']->set_acl_base($ui->dn); + $_SESSION['gofaxAccount']->set_acl_category("users"); + } $gofaxAccount= $_SESSION['gofaxAccount']; @@ -37,16 +40,6 @@ if (!$remove_lock){ $_SESSION['edit']= TRUE; } - /* Adjust acl's to mode */ - if (isset($_SESSION['edit'])){ - $acl= get_permissions ($ui->dn, $ui->subtreeACL); - $gofaxAccount->acl= get_module_permission($acl, "gofax", $ui->dn); - } else { - $acl= get_permissions ($ui->dn, $ui->subtreeACL); - $editacl= get_module_permission($acl, "gofax", $ui->dn); - $gofaxAccount->acl= "#none#"; - } - /* save changes to LDAP and disable edit mode */ if (isset($_POST['edit_finish'])){ @@ -57,7 +50,6 @@ if (!$remove_lock){ if (count ($message) == 0){ $gofaxAccount->save (); gosa_log ("User/fax object'".$ui->dn."' has been saved"); - $gofaxAccount->acl= "#none#"; del_lock ($ui->dn); sess_del ('edit'); @@ -92,7 +84,8 @@ if (!$remove_lock){ $info= " ".$ui->dn." "; } else { $info= "\"\" ".$ui->dn." "; - if (isset($editacl) && $editacl != "#none#"){ + + if(preg_match("/w/",$ui->get_permissions($ui->dn,"users/gofaxAccount"))){ $info.= "\"\""._("Click the 'Edit' button below to change informations in this dialog"); $display.= ""; } -- 2.30.2