From: hickert Date: Wed, 23 Dec 2009 12:11:17 +0000 (+0000) Subject: Updated acl list handling X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=739143319c513b98bc61d02a54c10d32f26d9040;p=gosa.git Updated acl list handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14933 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/admin/acl/acl-filter.xml b/gosa-core/plugins/admin/acl/acl-filter.xml index eda0371c8..01b9a7b56 100644 --- a/gosa-core/plugins/admin/acl/acl-filter.xml +++ b/gosa-core/plugins/admin/acl/acl-filter.xml @@ -37,11 +37,11 @@ 60 - (|(ou=*$*)(description=*$*)) + (|(cn=*$*)(ou=*$*)(description=*$*)) true LDAP - (&(|(objectClass=gosaAcl)(objectClass=gosaAclRole))(|(ou=*$NAME*)(description=*$NAME*))) + (&(|(objectClass=gosaAcl)(objectClass=gosaRole))(|(ou=*$NAME*)(description=*$NAME*)(cn=*$NAME*))) ou description 0.5 @@ -62,7 +62,7 @@ ROLE true - (objectClass=gosaAclRole) + (objectClass=gosaRole) diff --git a/gosa-core/plugins/admin/acl/acl-list.xml b/gosa-core/plugins/admin/acl/acl-list.xml index ca8d4c45f..8e3ce12d7 100644 --- a/gosa-core/plugins/admin/acl/acl-list.xml +++ b/gosa-core/plugins/admin/acl/acl-list.xml @@ -21,7 +21,7 @@ - gosaAclRole + gosaRole acl acl plugins/users/images/select_user.png @@ -49,7 +49,7 @@ ou string - %{filter:link(row,dn,"%s",ou)} + %{filter:filterLabel(row,dn,"%s",ou,cn,pid,base)} true diff --git a/gosa-core/plugins/admin/acl/class_aclManagement.inc b/gosa-core/plugins/admin/acl/class_aclManagement.inc index ad6c31653..dc652a6e5 100644 --- a/gosa-core/plugins/admin/acl/class_aclManagement.inc +++ b/gosa-core/plugins/admin/acl/class_aclManagement.inc @@ -51,6 +51,7 @@ class aclManagement extends management // Build headpage $headpage = new listing(get_template_path("acl-list.xml", true)); + $headpage->registerElementFilter("filterLabel", "aclManagement::filterLabel"); $headpage->setFilter($filter); // Add copy&paste and snapshot handler. @@ -64,6 +65,23 @@ class aclManagement extends management parent::__construct($config, $ui, "acl", $headpage); } + + // A filter which allows to open a department by clicking on the departments name. + static function filterLabel($row,$dn,$params,$ou= array(),$cn=array(),$pid=0,$base="") + { + if(!isset($ou[0])){ + $ou = $cn[0]; + }else{ + $ou = $ou[0]; + } + if($dn == $base){ + $ou ="."; + } + $dn= LDAP::fix(func_get_arg(1)); + return("$ou"); + } + + } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?>