增加功能:配置文件配置超级管理员与密码,由LgbPricipal类判断
This commit is contained in:
parent
95ee511e27
commit
c74c156d93
|
@ -51,9 +51,9 @@ namespace Bootstrap.Admin.Controllers
|
|||
var model = new LoginModel();
|
||||
if (string.IsNullOrEmpty(userName)) return View(model);
|
||||
model.UserName = userName;
|
||||
if (LgbPrincipal.IsAdmin(userName) || UserHelper.Authenticate(userName, password))
|
||||
if (LgbPrincipal.IsAdmin(userName, password) || UserHelper.Authenticate(userName, password))
|
||||
{
|
||||
FormsAuthentication.RedirectFromLoginPage(userName, false);
|
||||
FormsAuthentication.RedirectFromLoginPage(userName, remember == "true");
|
||||
}
|
||||
return View(model);
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
<add key="ClientValidationEnabled" value="true"/>
|
||||
<add key="UnobtrusiveJavaScriptEnabled" value="true"/>
|
||||
<add key="Admins" value="Argo;Test"/>
|
||||
<add key="Passwords" value="3oXfIiPEbZVE+d8JeeLCCcgrTFBq813HGCFv9StZ8EA=;OYefBWRKrVPOrADTAe/YjY3LAOCuv2WCEXwE2An1X68="/>
|
||||
</appSettings>
|
||||
|
||||
<connectionStrings>
|
||||
|
|
Loading…
Reference in New Issue