From: hickert Date: Fri, 23 Apr 2010 13:01:25 +0000 (+0000) Subject: Prepared acls X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=86c20667266a7cd92bec28ed592951596d832c8b;p=gosa.git Prepared acls git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17821 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/generic/references/class_reference.inc b/gosa-core/plugins/generic/references/class_reference.inc index 641f06192..4c3ab189f 100644 --- a/gosa-core/plugins/generic/references/class_reference.inc +++ b/gosa-core/plugins/generic/references/class_reference.inc @@ -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") + ) + + )); + } + + } ?> diff --git a/gosa-core/plugins/generic/references/contents.tpl b/gosa-core/plugins/generic/references/contents.tpl index a7f0bca61..37b6c868d 100644 --- a/gosa-core/plugins/generic/references/contents.tpl +++ b/gosa-core/plugins/generic/references/contents.tpl @@ -1,13 +1,31 @@ + +

{t}Object info{/t}

+{if !$referencesREAD} + {msgPool type='permView'} +{else} + test +{/if} +
- {$objectList} + {if !$referencesREAD} +

{t}Object references{/t}

+ {msgPool type='permView'} + {else} + {$objectList} + {/if}
  - {$acls} + {if !$aclREAD} +

{t}ACL trace{/t}

+ {msgPool type='permView'} + {else} + {$acls} + {/if}