Code

Added FAIstate update
[gosa.git] / plugins / admin / ogroups / class_ogroupManagement.inc
index 0c64897d726c4003adc65fe339d7783cf3c668cb..a852876df8eb608d018392f2b5c9831cafc87b05 100644 (file)
@@ -172,9 +172,8 @@ class ogroupManagement extends plugin
 
       /* Load permissions for selected 'dn' and check if
          we're allowed to remove this 'dn' */
-      $acl= get_permissions ($this->dn, $this->ui->subtreeACL);
-      $this->acl= get_module_permission($acl, "ogroup", $this->dn);
-      if (chkacl($this->acl, "delete") == ""){
+      $acl = $this->ui->get_permissions($this->dn,"ogroup");
+      if(preg_match("/d/",$acl)){
 
         /* Check locking, save current plugin in 'back_plugin', so
            the dialog knows where to return. */
@@ -204,7 +203,8 @@ class ogroupManagement extends plugin
 
       /* Some nice guy may send this as POST, so we've to check
          for the permissions again. */
-      if (chkacl($this->acl, "delete") == ""){
+      $acl = $this->ui->get_permissions($this->dn,"groups");
+      if(preg_match("/d/",$acl)){
 
         /* Delete request is permitted, perform LDAP action */
         $this->ogroup= new ogrouptabs($this->config,
@@ -258,13 +258,9 @@ class ogroupManagement extends plugin
          above dialog */
       add_lock ($this->dn, $this->ui->dn);
 
-      /* Set up the users ACL's for this 'dn' */
-      $acl= get_permissions ($this->dn, $this->ui->subtreeACL);
-
       /* Register grouptab to trigger edit dialog */
-      $this->ogroup= new ogrouptabs($this->config, $this->config->data['TABS']['OGROUPTABS'],
-          $this->dn);
-      $this->ogroup->set_acl($acl);
+      $this->ogroup= new ogrouptabs($this->config, $this->config->data['TABS']['OGROUPTABS'], $this->dn, "ogroups");
+      $this->ogroup->set_acl_base($this->dn);
       $_SESSION['objectinfo']= $this->dn;
     }