X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=setup%2Fclass_setupStep_Schema.inc;h=b5bd6bbf1d86bf8cda1ec1bbf38f967cf8af36f9;hb=68503ecbb4d310b61ef8f1f32003fc739bacb237;hp=bcfa7b56abb9e1240c8c2bf7a7f9415b4978c0cd;hpb=2eba5d4da490a3922cd70ddfa6d5642564a624b9;p=gosa.git diff --git a/setup/class_setupStep_Schema.inc b/setup/class_setupStep_Schema.inc index bcfa7b56a..b5bd6bbf1 100644 --- a/setup/class_setupStep_Schema.inc +++ b/setup/class_setupStep_Schema.inc @@ -37,9 +37,9 @@ class Step_Schema extends setup_step 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"); } @@ -66,7 +66,7 @@ class Step_Schema extends setup_step $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) @@ -206,19 +206,36 @@ class Step_Schema extends setup_step } } - $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; } }