index bcfa7b56abb9e1240c8c2bf7a7f9415b4978c0cd..b5bd6bbf1d86bf8cda1ec1bbf38f967cf8af36f9 100644 (file)
function update_strings()
{
- $this->s_title = _("Ldap schema check");
- $this->s_title_long = _("Ldap schema check");
- $this->s_info = _("This dialog checks your ldap schema setup");
+ $this->s_title = _("LDAP schema check");
+ $this->s_title_long = _("LDAP schema check");
+ $this->s_info = _("Perform test on your curren LDAP schema");
}
$smarty->assign("checks",$this->checked);
$smarty->assign("not_checked",$this->not_checked);
$smarty->assign("failed_checks",$failed_checks);
- return($smarty -> fetch (get_template_path("../setup/setup_step7.tpl")));
+ return($smarty -> fetch (get_template_path("../setup/setup_schema.tpl")));
}
function check_schema_version($description, $version)
}
}
- $this->checked = $checks;
$tmp = $objectclasses;
- $not_checked = array();
- foreach($tmp as $name => $val){
- $desc = "no description.";
- if(preg_match("/DESC/",$val)){
- $desc = preg_replace("/^.*DESC[ ]*'/i","",$val) ;
- $desc = preg_replace("/'.*$/i","",$desc) ;
- }
- $not_checked[$name] = $desc;
+
+ /* Depending on selected rfc2307bis mode, we need different schema configurations */
+ $rfc2307bis = $this->parent->captured_values['rfc2307bis'];
+ $posixGroup = $tmp['posixGroup'];
+ $structural = preg_match("/STRUCTURAL/i",$posixGroup);
+
+ /* The gosa base schema */
+ $checks['posixGroup'] = $def_check;
+ $checks['posixGroup']['REQUIRED_VERSION'] = "2.4";
+ $checks['posixGroup']['SCHEMA_FILES'] = array("gosa+samba3.schema","gosa.schema");
+ $checks['posixGroup']['CLASSES_REQUIRED'] = array("posixGroup");
+ $checks['posixGroup']['STATUS'] = TRUE;
+ $checks['posixGroup']['IS_MUST_HAVE'] = TRUE;
+ $checks['posixGroup']['MSG'] = "";
+ $checks['posixGroup']['INFO'] = "";
+
+ if($rfc2307bis && $structural){
+ $checks['posixGroup']['STATUS'] = FALSE;
+ $checks['posixGroup']['MSG'] = _("You have enabled the rfc2307bis option on the 'ldap setup' step, but your schema configuration do not support this option.");
+ $checks['posixGroup']['INFO'] = _("In order to use rfc2307bis corform groups the objectClass 'posixGroup' must be AUXILIARY");
}
+ if(!$rfc2307bis && !$structural){
+ $checks['posixGroup']['STATUS'] = FALSE;
+ $checks['posixGroup']['MSG'] = _("You have disabled the rfc2307bis option on the 'ldap setup' step, but your schema configuration do not support this option.");
+ $checks['posixGroup']['INFO'] = _("The objectClass 'posixGroup' must be STRUCTURAL");
+ }
+
- $this->not_checked = $not_checked;
+ $this->checked = $checks;
}
}