diff --git a/include/functions.inc b/include/functions.inc
index 1e9b5b6334afc879330dce855de588234052b38e..0cb50d54baef4386113ee88aef4807ff8d92f4bb 100644 (file)
--- a/include/functions.inc
+++ b/include/functions.inc
function get_list($filter, $subtreeACL, $base= "", $attributes= array(), $flags= GL_SUBSEARCH)
{
- global $config;
+ global $config, $ui;
/* Get LDAP link */
$ldap= $config->get_ldap_link($flags & GL_SIZELIMIT);
@@ -504,6 +504,12 @@ function get_list($filter, $subtreeACL, $base= "", $attributes= array(), $flags=
$ldap->cd ($base);
}
+ /* Strict filter for administrative units? */
+ if ($ui->gosaUnitTag != "" && isset($config->current['STRICT_UNITS']) &&
+ preg_match('/TRUE/i', $config->current['STRICT_UNITS'])){
+ $filter= "(&(gosaUnitTag=".$ui->gosaUnitTag.")$filter)";
+ }
+
/* Perform ONE or SUB scope searches? */
if ($flags & GL_SUBSEARCH) {
$ldap->search ($filter, $attributes);
if(isset($_SESSION['errors']) && strlen($_SESSION['errors'])==0) {
$_SESSION['errors'].= "<div style='margin-left:15%;margin-top:100px;".
- "background-color:white;padding:5px;border:5px solid red;width:55%;".
+ "background-color:white;padding:5px;border:5px solid red;width:55%;z-index:150;".
"position:absolute' id='e_layer'><table style='width:100%' summary='' border=0>".
"<tr><td style='vertical-align:top;padding:10px'><img alt='' src='".
get_template_path($img)."'></td>".