Unverified Commit 6ca94a11 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(setup) Insert default config earlier in setup

This should allow migrate step to use groupRDN without trouble.

issue #2895
Showing with 5 additions and 29 deletions
+5 -29
......@@ -96,7 +96,7 @@ class setupStepConfig extends configInLdap
function save_object ()
{
global $config;
global $config, $plist;
parent::save_object();
$this->is_completed = FALSE;
$tmp = $this->check();
......@@ -123,6 +123,10 @@ class setupStepConfig extends configInLdap
$config->set_current($config->current['NAME']);
session::un_set('plist');
pluglist::load();
/* Insert default config values, even for installed plugin */
$config->loadPlist($plist);
$config->checkLdapConfig(TRUE);
/* Set as completed and reload step */
$this->is_completed = TRUE;
$this->parent->reBuildConfigStep(TRUE);
}
......
......@@ -52,33 +52,6 @@ class setupStepFinish extends setupStep
return $smarty->fetch(CONFIG_TEMPLATE_DIR.CONFIG_FILE);
}
function insertConfigDefaults ()
{
/* Insert default config values, even for installed plugin */
global $config, $ui, $plist, $BASE_DIR;
$cv = $this->parent->captured_values;
/* Create config object */
$config = new config(CONFIG_DIR."/".CONFIG_FILE, $BASE_DIR);
$config->set_current($config->data['MAIN']['DEFAULT']);
/* Create ui object */
/* got user dn, fill acl's */
$ui = new userinfo($cv['valid_admin']);
/* Username is set, load subtreeACL's now */
$ui->loadACL();
/* We need the pluglist object */
load_all_classes();
$plist = new pluglist();
/* Now we can save LDAP config */
$config->loadPlist($plist);
$config->checkLdapConfig(TRUE);
}
function execute (): string
{
/* Check if there is currently an active fusiondirectory.conf */
......@@ -108,7 +81,6 @@ class setupStepFinish extends setupStep
* - Permisssion are set correctly
*/
if (isset($_POST['next']) && $exists && !$this->is_world_readable(CONFIG_DIR.'/'.CONFIG_FILE)) {
$this->insertConfigDefaults();
session::destroy();
header('Location: index.php');
exit();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment