index 77003f9e706d8bfeb1571e87f51aba54d3808492..0715c700889cf8fd52a10fc31f1bb2d79a4b5705 100644 (file)
{
$ldap= $this->config->get_ldap_link();
+ /* Check if we should include the unittag */
+ $tag= "";
+ if ($this->gosaUnitTag != "" && isset($this->config->current['STRICT_UNITS']) &&
+ preg_match('/TRUE/i', $this->config->current['STRICT_UNITS'])){
+ $tag= "(gosaUnitTag=".$this->gosaUnitTag.")";
+ }
+
/* Load ACL's from all groups we're in */
$this->subtreeACL= array();
$ldap->cd($this->config->current['BASE']);
if ($this->gidNumber == -1){
- $ldap->search("(&(objectClass=posixGroup)(objectClass=gosaObject)".
+ $ldap->search("(&(objectClass=posixGroup)(objectClass=gosaObject)".$tag.
"(memberUid=$this->username))");
} else {
- $ldap->search("(&(objectClass=posixGroup)(objectClass=gosaObject)".
+ $ldap->search("(&(objectClass=posixGroup)(objectClass=gosaObject)".$tag.
"(|(memberUid=$this->username)(gidNumber=$this->gidNumber)))");
}