Code

Added dummy reference tab
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 21 Apr 2010 12:26:58 +0000 (12:26 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 21 Apr 2010 12:26:58 +0000 (12:26 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17775 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_tabs.inc
gosa-core/include/class_userinfo.inc
gosa-core/plugins/generic/references/class_reference.inc

index a529f87a39342bfe7d3686f372b847ced43d3be3..ccc3f7c715f9ee98d79341ab7ff5bbd3cebe9c23 100644 (file)
@@ -387,6 +387,7 @@ class tabs
       $this->by_name['reference']= _("References");
       $this->by_object['reference']= new reference($this->config, $this->dn);
       $this->by_object['reference']->parent= &$this;
+      $this->by_object['reference']->set_acl_category($this->acl_category);
     }
   }
 
index 1eb5690b48278ad10261ed41bbc7d8d7f8ce6c09..336923ac5c4b7f948779c21f6f39aa259f4b981a 100644 (file)
@@ -189,6 +189,7 @@ class userinfo
           }
           $this->ACL[$dn][$idx]= $type;
         }
+        $this->allACLs[$dn][$idx]= $type;
       }
     }
 
@@ -225,10 +226,12 @@ class userinfo
           
             /* Remove all acl entries which are especially for the current user (self acl)
              */
-            foreach($acl_set['acl'] as $object => $object_acls){
-              if(isset($object_acls[0]) && strpos($object_acls[0],"s")){
-                unset($without_self_acl[$sdn][$dn][$acl_id]['acl'][$object]);
-              }
+            if(isset($acl_set['acl'])){ 
+                foreach($acl_set['acl'] as $object => $object_acls){
+                    if(isset($object_acls[0]) && strpos($object_acls[0],"s")){
+                        unset($without_self_acl[$sdn][$dn][$acl_id]['acl'][$object]);
+                    }
+                }
             }
           }
         }
@@ -592,15 +595,17 @@ class userinfo
       foreach($this->ACL as $dn => $infos){
         foreach($infos as $info){
           $found = FALSE;
-          foreach($info['acl'] as $cat => $data){
-
-            /* Skip self acls? */
-            if($skip_self_acls && isset($data['0']) && (strpos($data['0'], "s") !== FALSE)) continue;
-            if(preg_match("/^".preg_quote($mod, '/')."/",$cat)){
-              $found =TRUE;
-              break;
-            }
-          } 
+          if(isset($info['acl'])){
+              foreach($info['acl'] as $cat => $data){
+
+                  /* Skip self acls? */
+                  if($skip_self_acls && isset($data['0']) && (strpos($data['0'], "s") !== FALSE)) continue;
+                  if(preg_match("/^".preg_quote($mod, '/')."/",$cat)){
+                      $found =TRUE;
+                      break;
+                  }
+              } 
+        } 
 
           if($found && !isset($this->config->idepartments[$dn])){
             while(!isset($this->config->idepartments[$dn]) && strpos($dn, ",")){
index 6c92e9f5be8cd6d6d7e4de333f3acd0b2db8a4d2..1c36e1b10f88c8efe4afc9ea20ccdfdda3901a66 100644 (file)
@@ -79,6 +79,13 @@ class reference extends plugin
     /* Call parent execute */
     plugin::execute();
 
+    // ACL's we have
+    $ui = get_userinfo();
+    
+
+    $r = new aclResolver($this->config, $this->dn, $this);
+    return($r->getReadableACL());
+
     /* Set government mode */
     $smarty= get_smarty();