From 619afb691a2cee0eaf0408269f86d5a17361b3d6 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 2 Dec 2005 07:56:21 +0000 Subject: [PATCH] Fixed acls for conference git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2197 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/groups/acl_definition.inc | 19 ++++++++++++++++++- .../class_phoneConferenceManagment.inc | 15 +++++---------- plugins/gofon/conference/main.inc | 3 +++ 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/plugins/admin/groups/acl_definition.inc b/plugins/admin/groups/acl_definition.inc index d37ec001b..638bd2084 100644 --- a/plugins/admin/groups/acl_definition.inc +++ b/plugins/admin/groups/acl_definition.inc @@ -293,7 +293,24 @@ $ACLD['logview'] = array("logview"); $ACLD['mailqueue'] = array("mailqueue","unhold_all","hold_all","del_all","requeue_all","unhold","hold","del","requeue","query","header"); $ACLD['ldapmanager']= array("ldapmanager","import","export","xlsexport","csvimport"); -$ACLD['goFonConference'] = array("goFonConference" => "goFonConference"); +$ACLD['conference'] = array( + "conference", + "cn", + "base", + "description", + "goFonPIN", + "goFonConferenceOption_P", + "goFonConferenceOption_r", + "goFonConferenceOption_M", + "goFonConferenceOption_s", + "goFonConferenceOption_i", + "goFonConferenceOption_c", + "goFonConferenceOption_D", + "goFonConferenceOptionFormat", + "goFonConferenceOptionLifetime", + "telephoneNumber", + "goFonConferenceOwner"); + $ACLD['FAIclass'] = array( "FAIclass" => "FAIclass" diff --git a/plugins/gofon/conference/class_phoneConferenceManagment.inc b/plugins/gofon/conference/class_phoneConferenceManagment.inc index 70b0b253c..1bddbdf66 100644 --- a/plugins/gofon/conference/class_phoneConferenceManagment.inc +++ b/plugins/gofon/conference/class_phoneConferenceManagment.inc @@ -47,6 +47,9 @@ class phoneConferenceManagment extends plugin $this->dn = ""; $this->config = $config; + $acl= get_permissions ($ui->dn, $ui->subtreeACL); + $this->acl= get_module_permission($acl, "conference", $ui->dn); + /* Get global filter config */ if (!isset($_SESSION["conferencefilter"])){ $base= get_base_from_people($ui->dn); @@ -60,6 +63,7 @@ class phoneConferenceManagment extends plugin /* Execute class and display something */ function execute() { + /* Call parent execute */ plugin::execute(); @@ -186,7 +190,7 @@ class phoneConferenceManagment extends plugin */ if (isset($_POST['delete_department_confirm'])){ $acl= get_permissions ($this->dn, $this->ui->subtreeACL); - $acl= get_module_permission($acl, "goFonConference", $this->dn); + $acl= get_module_permission($acl, "conference", $this->dn); if (chkacl($acl, "all") == ""){ $this->remove_from_parent(); gosa_log ("Department object'".$this->dn."' has been removed"); @@ -210,9 +214,6 @@ class phoneConferenceManagment extends plugin /* Lock the current entry, so everyone will get the above dialog */ add_lock ($this->dn, $this->ui->dn); - /* Set up the users ACL's for this 'dn' */ - $this->acl= get_permissions ($this->dn, $this->ui->subtreeACL); - /* Register conftab to trigger edit dialog */ $this->conftab= new conferencetabs($this->config,$this->config->data['TABS']['CONFERENCETABS'], $this->dn); $this->conftab->set_acl($this->acl); @@ -223,12 +224,9 @@ class phoneConferenceManagment extends plugin if($s_action == "new"){ $this->dn= "new"; /* Set up the users ACL's for this 'dn' */ - $this->acl= get_permissions ($this->dn, $this->ui->subtreeACL); $this->dn= "new"; $this->conftab= new conferencetabs($this->config,$this->config->data['TABS']['CONFERENCETABS'], $this->dn); - $this->acl= get_permissions ($this->conftab->dn, $this->ui->subtreeACL); $this->conftab->set_acl($this->acl); - $this->conftab->set_acl(array(':all')); unset($_SESSION['objectinfo']);// } @@ -370,9 +368,6 @@ class phoneConferenceManagment extends plugin $a_field1 = array("string"=>sprintf($userimg,_("Conference")), "attach" => "style='text-align:center;width:20px;'"); - $acl= get_permissions ($conference['dn'], $this->ui->subtreeACL); - $this->acl = get_module_permission($acl, "goFonConference", $conference['dn']); - if(($this->ui->dn==$conference['goFonConferenceOwner'][0])&&(chkacl($this->acl,"goFonConferenceOwner")=="")){ $a_field2 = array("string"=>sprintf($editlink,$conferencekey,$conference['cn'][0].$number), "attach" => "style=''"); }else{ diff --git a/plugins/gofon/conference/main.inc b/plugins/gofon/conference/main.inc index 8d78cdcea..e276d6f7e 100644 --- a/plugins/gofon/conference/main.inc +++ b/plugins/gofon/conference/main.inc @@ -40,6 +40,9 @@ if ($remove_lock){ $display= print_header(get_template_path('images/conference.png'), _("Conference management")); } + $acl= get_permissions ($ui->dn, $ui->subtreeACL); + $conference->acl= get_module_permission($acl, "conference", $ui->dn); + /* Reset requested? */ if (isset($_GET['reset']) && $_GET['reset'] == 1){ del_lock ($ui->dn); -- 2.30.2