Code

Prepared acls
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 23 Apr 2010 13:01:25 +0000 (13:01 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 23 Apr 2010 13:01:25 +0000 (13:01 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17821 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/generic/references/class_reference.inc
gosa-core/plugins/generic/references/contents.tpl

index 641f06192f7388078065296dd2ce12e7003c1814..4c3ab189fba831bd2aa163e9b10daa0965906e25 100644 (file)
@@ -119,14 +119,46 @@ class reference extends plugin
     {
         // Mark plugin as viewed
         plugin::execute();
-
         $smarty = get_smarty();        
+
+        // Assign permissions
+        $tmp = $this->plInfo();
+        $ui = get_userinfo();
+        foreach($tmp['plProvidedAcls'] as $name => $desc){
+            $smarty->assign($name.'READ', $ui->get_permissions($this->dn, 'references/reference', $name));
+        }
+
         $smarty->assign('objectList', $this->objectList);
         $smarty->assign("acls",$this->aclResolver->getReadableACL());
         $smarty->assign("usePrototype", "true");
         session::set('autocomplete', $this->aclResolver);
         return ($smarty->fetch (get_template_path('contents.tpl', TRUE, dirname(__FILE__))));
     }
+
+
+
+    static function plInfo()
+    {
+        return (array(
+                    "plShortName"   => _("Reference"),
+                    "plDescription" => _("Object references"),
+                    "plSelfModify"  => TRUE,
+                    "plDepends"     => array(),
+                    "plPriority"    => 0,
+                    "plSection"     => array("administration"),
+                    "plCategory"    => array("references" => array("description"  => _("References"),
+                                             "objectClass"  => array())),
+                    "plProvidedAcls"=> array(
+                        "references"   => _("View object references"),
+                        "acl"          => _("View acl trace"),
+                        "info"         => _("View object info"),
+                        "export"       => _("Allow entry export")
+                        )
+
+                    ));
+    }
+
+
 }
 
 ?>
index a7f0bca61afd752529efd97de1eb1493205343e9..37b6c868dd49e74b6c8465dc8923c4b90328472c 100644 (file)
@@ -1,13 +1,31 @@
+
+<h3>{t}Object info{/t}</h3>
+{if !$referencesREAD}
+    {msgPool type='permView'}
+{else}
+    test
+{/if}
+<hr>
 <table summary='{t}Object references{/t}' class='reference-tab'>
     <tr>
         <td style='width:48%'>
-             {$objectList}
+            {if !$referencesREAD}
+                <h3>{t}Object references{/t}</h3>
+                {msgPool type='permView'}
+            {else}
+                {$objectList}
+            {/if}
         </td>
         <td class='right-border'>
           &nbsp;
         </td>
         <td>
-            {$acls}
+            {if !$aclREAD}
+                <h3>{t}ACL trace{/t}</h3>
+                {msgPool type='permView'}
+            {else}
+                {$acls}
+            {/if}
         </td>
     </tr>
 </table>