Code

Fixed acls
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 25 Oct 2006 04:00:30 +0000 (04:00 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 25 Oct 2006 04:00:30 +0000 (04:00 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4928 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/gofax/blocklists/class_blocklistManagement.inc

index a27d033196f041f34b397ce5c705fbb3058c6260..efe792ca8cb41f499f931bd6ba8db8ae3140e626 100644 (file)
@@ -100,7 +100,7 @@ class blocklist extends plugin
 
 
     /***************
-      Cancel some dialogs  
+      Create a new blocklist (dialog)
      ***************/
 
     /* Create new blocklist? */
@@ -250,8 +250,13 @@ class blocklist extends plugin
 
     if($this->dn){
 
+      $dn = $this->dn;
+      if($dn == "new"){
+        $dn = "cn=dummy,ou=gofax,ou=systems,".$this->base; 
+      }
+
       $this->set_acl_category("gofax");
-      $this->set_acl_base($this->dn);
+      $this->set_acl_base($dn);
 
 
       /* Base select dialog */
@@ -404,7 +409,11 @@ class blocklist extends plugin
     /* appen && sort */
     $tmp=array();
     foreach($this->blocklists as $tkey => $val ){
-      $tmp[strtolower($val['cn'][0]).$val['cn'][0]]=$val;
+
+      $acl = $this->ui ->get_permissions($base,"gofax/blocklist");
+      if(preg_match("/r/",$acl)){
+        $tmp[strtolower($val['cn'][0]).$val['cn'][0]]=$val;
+      }
     }
     ksort($tmp);
     $this->blocklists=array();