Code

Update acl stuff
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 22 Jan 2010 10:51:43 +0000 (10:51 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 22 Jan 2010 10:51:43 +0000 (10:51 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15255 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_listing.inc

index 8dc550dfff5575590eb29614afa2ffa9a309c6ef..85198923fd71f9656d65b5c8a7167e5ada512d93 100644 (file)
@@ -746,16 +746,6 @@ class listing {
           continue;
         }
 
-        // Move acl information if needed
-        if ($param == "acl") {
-          $otype= $this->getObjectType($this->objectTypes, $config["objectClass"]);
-          echo "Type: $otype<br>";
-          #$category= $this->category[$otype];
-          #$params[]= $ui->get_category_permissions($config["dn"], $category);
-          $params[]= 'rwcdm';
-          continue;
-        }
-
         // Move dn if needed
         if ($param == "dn") {
           $params[]= LDAP::fix($config["dn"]);
@@ -852,7 +842,7 @@ class listing {
     $actions= $this->xmlData['actiontriggers']['action'];
     foreach($actions as $action) {
       // Skip the entry completely if there's no permission to execute it
-      if (!$this->hasActionPermission($action, $dn)) {
+      if (!$this->hasActionPermission($action, $dn, $classes)) {
         $result.= "<img src='images/empty.png' alt=' ' class='center' style='padding:1px'>";
         continue;
       }
@@ -1213,10 +1203,18 @@ class listing {
   }
 
 
-  function hasActionPermission($action, $dn)
+  function hasActionPermission($action, $dn, $classes= null)
   {
     $ui= get_userinfo();
 
+############# MARKER
+    if ($classes) {
+      $otype= $this->getObjectType($this->objectTypes, $classes);
+      echo "Type: $otype<br>";
+      #$category= $this->category[$otype];
+      #$params[]= $ui->get_category_permissions($dn, $category);
+    }
+
     if (isset($action['acl'])) {
       $acls= $action['acl'];
       if (!is_array($acls)) {