summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3e6d884)
raw | patch | inline | side by side (parent: 3e6d884)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 26 Jan 2010 13:19:55 +0000 (13:19 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 26 Jan 2010 13:19:55 +0000 (13:19 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15319 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-core/plugins/personal/posix/class_posixAccount.inc b/gosa-core/plugins/personal/posix/class_posixAccount.inc
index bef6a4264b4ece65270004f10937e941a70a1917..2bd4f5fac4abff81c49ae30ed94df352ee296778 100644 (file)
/* Show ws dialog */
if ($this->trustSelect){
+
+ // Build up blocklist
+ session::set('filterBlacklist', array('cn' => array_values($this->accessTo)));
return($this->trustSelect->execute());
}
/* Manage group add dialog */
if ($this->groupSelect){
+
+ // Build up blocklist
+ session::set('filterBlacklist', array('dn' => array_keys($this->groupMembership)));
return($this->groupSelect->execute());
}
diff --git a/gosa-core/plugins/personal/posix/groupSelect/class_filterLDAPBlacklist.inc b/gosa-core/plugins/personal/posix/groupSelect/class_filterLDAPBlacklist.inc
--- /dev/null
@@ -0,0 +1,31 @@
+<?php
+
+class filterLDAPBlacklist {
+
+ static function query($base, $scope, $filter, $attributes, $category, $objectStorage= "")
+ {
+ $result = filterLDAP::query($base, $scope, $filter, $attributes, $category, $objectStorage);
+ return(filterLDAPBlacklist::filterByBlacklist($result));
+ }
+
+ static function filterByBlacklist($entries)
+ {
+ if(session::is_set('filterBlacklist')){
+ $blist = session::get('filterBlacklist');
+ foreach($blist as $attr_name => $attr_values){
+ foreach($attr_values as $match){
+ foreach($entries as $id => $entry){
+ if(isset($entry[$attr_name])){
+ $test = $entry[$attr_name];
+ if(!is_array($test)) $test = array($test);
+ if(in_array($match, $test)) unset($entries[$id]);
+ }
+ }
+ }
+ }
+ }
+ return(array_values($entries));
+ }
+}
+
+?>
diff --git a/gosa-core/plugins/personal/posix/groupSelect/group-filter.xml b/gosa-core/plugins/personal/posix/groupSelect/group-filter.xml
index 00d28e4b513c51187fb111f5095a6e2381e8a574..5a43637b3619a8d1f1ea65ee716aaff111dc6c97 100644 (file)
<search>
<query>
- <backend>LDAP</backend>
+ <backend>LDAPBlacklist</backend>
<filter>(&(objectClass=posixGroup)$NAME(|$PRIMARY$MAIL$SAMBA))</filter>
<attribute>dn</attribute>
<attribute>objectClass</attribute>
<set>(|(cn=*$*)(description=*$*))</set>
<alphabet>true</alphabet>
<autocomplete>
- <backend>LDAP</backend>
+ <backend>LDAPBlacklist</backend>
<filter>(&(objectClass=posixGroup)(|(cn=*$NAME*)(description=*$NAME*)))</filter>
<attribute>cn</attribute>
<frequency>0.5</frequency>
diff --git a/gosa-core/plugins/personal/posix/trustSelect/trust-filter.xml b/gosa-core/plugins/personal/posix/trustSelect/trust-filter.xml
index c0b3555642fa1073af32f27a96d5217426fbab9c..10ea5d554ee75fefe3d8598035d8c0a37f7f03f6 100644 (file)
<search>
<query>
- <backend>LDAP</backend>
+ <backend>LDAPBlacklist</backend>
<filter>(&(|$SERVER $WORKSTATION $TERMINAL)$NAME)</filter>
<attribute>dn</attribute>
<attribute>objectClass</attribute>
<set>(cn=*$*)</set>
<alphabet>false</alphabet>
<autocomplete>
- <backend>SYSTEMS</backend>
+ <backend>LDAPBlacklist</backend>
<filter>(cn=*$NAME*)</filter>
<attribute>cn</attribute>
<frequency>0.5</frequency>