X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fclass_userinfo.inc;h=783b66822fe500558313f1ca8a27c726243f02a5;hb=11c7b3cede7df2e10f492c21431564a21b9dea50;hp=9ceefc964318b6a2d37c606be882ca94e8ab27cf;hpb=0c8872a1e9a1ec505c3a72a430fd25b23fddd177;p=gosa.git diff --git a/include/class_userinfo.inc b/include/class_userinfo.inc index 9ceefc964..783b66822 100644 --- a/include/class_userinfo.inc +++ b/include/class_userinfo.inc @@ -97,6 +97,31 @@ class userinfo $aclc[$attrs['dn']]= $ol; } + /* Resolve roles here. + */ + foreach($aclc as $dn => $data){ + foreach($data as $prio => $aclc_value) { + if($aclc_value['type'] == "role"){ + + unset($aclc[$dn][$prio]); + + $ldap->cat($aclc_value['acl'],array("gosaAclTemplate")); + $attrs = $ldap->fetch(); + + if(isset($attrs['gosaAclTemplate'])){ + for($i= 0; $i<$attrs['gosaAclTemplate']['count']; $i++){ + $tmp = @acl::explodeAcl($attrs['gosaAclTemplate'][$i]); + + foreach($tmp as $new_acl){ + $new_acl['members'] = $aclc_value['members']; + $aclc[$dn][] =$new_acl; + } + } + } + } + } + } + /* ACL's read, sort for tree depth */ asort($aclp); @@ -261,6 +286,11 @@ class userinfo } } + /* Load departments here, if we are using php4 */ + if(is_php4() && !count($this->config->departments)){ + $this->config->get_departments(); + } + /* For all gosaDepartments */ foreach ($this->config->departments as $dn){ $acl= array("r" => "", "w" => "", "c" => "", "d" => "", "m" => "", "a" => "");