Ejemplo n.º 1
0
        public IActionResult StepFour(StepFourModel model)
        {
            if (!CheckStep(4))
            {
                return(Redirect("3"));
            }

            if (ModelState.IsValid && model != null)
            {
                GlobalSettings.Store("LDAP_SearchBase", model.SearchBase);
                GlobalSettings.Store("LDAP_AdminFilter", model.AdminFilter);
                GlobalSettings.Store("LDAP_UsersFilter", model.UserFilter);

                Helpers.ReplaceEnvVariableInFile(GlobalSettings.Get("CONFIG_FILE"), "SP_CONFIG_SETUPASSISTANT_STEP", "5");
                GlobalSettings.Store("CONFIG_SETUPASSISTANT_STEP", "5");
            }

            return(View(model));
        }
Ejemplo n.º 2
0
        public IActionResult StepFour()
        {
            if (!CheckStep(4))
            {
                return(Redirect("3"));
            }

            var ldapSearchBase  = GlobalSettings.Get("LDAP_SearchBase");
            var ldapAdminFilter = GlobalSettings.Get("LDAP_AdminFilter");
            var ldapUserFilter  = GlobalSettings.Get("LDAP_UsersFilter");

            StepFourModel model = new StepFourModel();

            model.SearchBase  = ldapSearchBase != null ? ldapSearchBase : "";
            model.AdminFilter = ldapAdminFilter != null ? ldapAdminFilter : "uid={0}";
            model.UserFilter  = ldapUserFilter != null ? ldapUserFilter : "uid={0}";

            return(View(model));
        }