Code

Fixed acls for conference
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 2 Dec 2005 07:56:21 +0000 (07:56 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 2 Dec 2005 07:56:21 +0000 (07:56 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2197 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/groups/acl_definition.inc
plugins/gofon/conference/class_phoneConferenceManagment.inc
plugins/gofon/conference/main.inc

index d37ec001bc5fbd22b97f09ac5b7c73cafbdfa91b..638bd208402d3ca9f6ba73a004d2a2d4741ffec8 100644 (file)
@@ -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"
index 70b0b253c31b093ecfa49dab4971299027d2262a..1bddbdf660e8fbbb9c9564a476dbae24b91bf334 100644 (file)
@@ -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{  
index 8d78cdcea902e00c2193a53361be3c4e80c06e30..e276d6f7e211c33b289323919b3a274fae6d1737 100644 (file)
@@ -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);