From: hickert Date: Wed, 11 Jul 2007 08:33:22 +0000 (+0000) Subject: Added Strict Unit Tag Filter for ACL X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b9ecd74d0807db08b8a7a30f09b66ee0a61df078;p=gosa.git Added Strict Unit Tag Filter for ACL git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6826 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_userinfo.inc b/include/class_userinfo.inc index 77003f9e7..0715c7008 100644 --- a/include/class_userinfo.inc +++ b/include/class_userinfo.inc @@ -65,14 +65,21 @@ class userinfo { $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)))"); }