From: psc Date: Tue, 31 May 2011 07:14:43 +0000 (+0000) Subject: Apply fix for #6890 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8e82715d3a71aa15d36b2b62d1f9bc9160457c7f;p=gosa.git Apply fix for #6890 When asking for object groups during system creation, filter list of available object groups by unittag. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@20903 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/trunk/gosa-plugins/systems/admin/systems/class_askOgroup.inc b/trunk/gosa-plugins/systems/admin/systems/class_askOgroup.inc index 5788dbc90..e91c8e94b 100644 --- a/trunk/gosa-plugins/systems/admin/systems/class_askOgroup.inc +++ b/trunk/gosa-plugins/systems/admin/systems/class_askOgroup.inc @@ -23,7 +23,12 @@ class askObjectGroup extends plugin /* Get a list of object groups */ $ldap = $this->config->get_ldap_link(); $ldap->cd($this->config->current['BASE']); - $ldap->search('(objectClass=gosaGroupOfNames)', array("cn")); + if (isset($this->config->current['HONOURUNITTAGS']) && + preg_match('/true/i', $this->config->current['HONOURUNITTAGS'])) { + $ldap->search('(&(objectClass=gosaGroupOfNames)(gosaUnitTag='.$ui->gosaUnitTag.'))', array("cn")); + } else { + $ldap->search('(objectClass=gosaGroupOfNames)', array("cn")); + } $tmp = array(); while($attrs = $ldap->fetch()) { $tmp[$attrs['dn']] = $attrs['cn'][0];