summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: be02596)
raw | patch | inline | side by side (parent: be02596)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 23 Dec 2009 12:11:17 +0000 (12:11 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 23 Dec 2009 12:11:17 +0000 (12:11 +0000) |
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 eda0371c8211d5b4f030d5a58b292cb1c5857823..01b9a7b56b6fff46d422a52f4620bf573be762c1 100644 (file)
<maxlength>60</maxlength>
<default></default>
<unset></unset>
- <set>(|(ou=*$*)(description=*$*))</set>
+ <set>(|(cn=*$*)(ou=*$*)(description=*$*))</set>
<alphabet>true</alphabet>
<autocomplete>
<backend>LDAP</backend>
- <filter>(&(|(objectClass=gosaAcl)(objectClass=gosaAclRole))(|(ou=*$NAME*)(description=*$NAME*)))</filter>
+ <filter>(&(|(objectClass=gosaAcl)(objectClass=gosaRole))(|(ou=*$NAME*)(description=*$NAME*)(cn=*$NAME*)))</filter>
<attribute>ou</attribute>
<attribute>description</attribute>
<frequency>0.5</frequency>
<tag>ROLE</tag>
<default>true</default>
<unset></unset>
- <set>(objectClass=gosaAclRole)</set>
+ <set>(objectClass=gosaRole)</set>
</element>
</filterdef>
index ca8d4c45f7c51809ecdaed85a5d74c701dbdb0e0..8e3ce12d763e03ed7983ad9ed25f1496c4e37d57 100644 (file)
<objectType>
<label>Role</label>
- <objectClass>gosaAclRole</objectClass>
+ <objectClass>gosaRole</objectClass>
<category>acl</category>
<class>acl</class>
<image>plugins/users/images/select_user.png</image>
<label>Name</label>
<sortAttribute>ou</sortAttribute>
<sortType>string</sortType>
- <value>%{filter:link(row,dn,"%s",ou)}</value>
+ <value>%{filter:filterLabel(row,dn,"%s",ou,cn,pid,base)}</value>
<export>true</export>
</column>
diff --git a/gosa-core/plugins/admin/acl/class_aclManagement.inc b/gosa-core/plugins/admin/acl/class_aclManagement.inc
index ad6c316538f7d1e5c204616a00f26cfce93b3b1e..dc652a6e57861638ef49b11cc41de4c5744c1683 100644 (file)
// 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.
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("<a href='?plug=".$_GET['plug']."&PID=$pid&act=listing_open_$row' title='$dn'>$ou</a>");
+ }
+
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>