public ActionResult Configure()
 {
     if (_systemSettings.IsInitialized())
     {
         return RedirectToAction("Index", "Home");
     }
     var existingAdminUser = _systemSetterUpper.GetAdministratorUser();
     if (existingAdminUser == null)
     {
         return RedirectToAction("Start", "Setup");
     }
     var model = new SystemConfigureData
     {
         AllowSelfRegistration = true,
         DefaultAccess = EnumPermissionAccess.Grant
     };
     if(_systemSettings.IsInitialized())
     {
         model.AllowSelfRegistration = _systemSettings.AllowSelfRegistration;
         model.DefaultAccess = _systemSettings.DefaultAccess;
     }
     return View(model);            
 }
        public ActionResult Configure(SystemConfigureData model)
        {
            if (_systemSettings.IsInitialized())
            {
                return RedirectToAction("Index", "Home");
            }
            var existingAdminUser = _systemSetterUpper.GetAdministratorUser();
            if (existingAdminUser == null)
            {
                return RedirectToAction("Start", "Setup");
            }
            if (this.ModelState.IsValid)
            {
                try 
                {
                    _systemSetterUpper.SetupAdministratorUser(model.AllowSelfRegistration, model.DefaultAccess.GetValueOrDefault());
                    return RedirectToAction("Complete", "Setup");
                }
                catch(Exception err)
                {
                    this.ModelState.AddModelError("", err);
                }
            }

            // If we got this far, something failed, redisplay form
            return View(model);
        }