From: hickert Date: Fri, 23 Apr 2010 14:08:30 +0000 (+0000) Subject: Added ACLs X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=603c99890940b25833a30336c6bb5ae8171cdd17;p=gosa.git Added ACLs git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17823 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 4c3ab189f..2cb779472 100644 --- a/gosa-core/plugins/generic/references/class_reference.inc +++ b/gosa-core/plugins/generic/references/class_reference.inc @@ -124,9 +124,11 @@ class reference extends plugin // 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)); - } + + $category = preg_replace("/\/.*$/", "", $this->acl_category); + $smarty->assign('aclREAD', preg_match("/r/",$ui->get_category_permissions($this->dn, 'acl'))); + $smarty->assign('completeACL', $ui->has_complete_category_acls($this->dn, $category)); + $smarty->assign('someACL', $ui->get_category_permissions($this->dn, $category)); $smarty->assign('objectList', $this->objectList); $smarty->assign("acls",$this->aclResolver->getReadableACL()); @@ -134,31 +136,6 @@ class reference extends plugin 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 37b6c868d..f1fbc339c 100644 --- a/gosa-core/plugins/generic/references/contents.tpl +++ b/gosa-core/plugins/generic/references/contents.tpl @@ -1,6 +1,6 @@

{t}Object info{/t}

-{if !$referencesREAD} +{if !$someACL|regex_replace:"/[cdmr]/":"" == "r"} {msgPool type='permView'} {else} test @@ -9,8 +9,7 @@
- {if !$referencesREAD} -

{t}Object references{/t}

+ {if !$completeACL|regex_replace:"/[cdmr]/":"" == "r"} {msgPool type='permView'} {else} {$objectList}