summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fef43e1)
raw | patch | inline | side by side (parent: fef43e1)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 27 Jun 2006 07:47:50 +0000 (07:47 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 27 Jun 2006 07:47:50 +0000 (07:47 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@3924 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_config.inc | patch | blob | history |
index 879039f4b3d2c1f0cb5bf3fa3730779d072d0439..5f5af979d1208436a18984e739532d63dbf56bab 100644 (file)
--- a/include/class_config.inc
+++ b/include/class_config.inc
var $departments= array();
var $idepartments= array();
var $adepartments= array();
+ var $tdepartments= array();
function config($filename, $basedir= "")
{
$result= array();
$administrative= array();
$result['/']= $this->current['BASE'];
+ $this->tdepartments= array();
/* Get list of department objects */
$ldap= $this->get_ldap_link();
$ldap->search ("(objectClass=gosaDepartment)", array("ou", "objectClass", "gosaUnitTag"));
while ($attrs= $ldap->fetch()){
$dn= $ldap->getDN();
+ $this->tdepartments[$dn]= "";
/* Save administrative departments */
if (in_array_ics("gosaAdministrativeUnit", $attrs['objectClass']) &&
isset($attrs['gosaUnitTag'][0])){
$administrative[$dn]= $attrs['gosaUnitTag'][0];
+ $this->tdepartments[$dn]= $attrs['gosaUnitTag'][0];
+ }
+
+ if (in_array_ics("gosaAdministrativeUnitTag", $attrs['objectClass']) &&
+ isset($attrs['gosaUnitTag'][0])){
+ $this->tdepartments[$dn]= $attrs['gosaUnitTag'][0];
}
if ($dn == $ignore_dn){
global $config;
$base = $config->current['BASE'];
- $arr = array();
-
+ $arr= array();
+ $ui= get_userinfo();
$this->idepartments= array();
/* Create multidimensional array, with all departments. */
foreach ($this->departments as $key => $val){
+ /* When using strict_units, filter non relevant parts */
+ if (preg_match('/true/i', $config->current['STRICT_UNITS'])){
+ if ($ui->gosaUnitTag != "" && isset($this->tdepartments[$val]) &&
+ $this->tdepartments[$val] != $ui->gosaUnitTag){
+ continue;
+ }
+ }
+
/* remove base from dn */
$val2 = str_replace($base,"",$val);