安全设置中增加允许记住登录选项

This commit is contained in:
GoEdgeLab
2021-08-11 09:36:16 +08:00
parent 062b08b890
commit 9f1713acdc
4 changed files with 31 additions and 13 deletions

View File

@@ -69,11 +69,12 @@ func (this *IndexAction) RunGet(params struct{}) {
}
func (this *IndexAction) RunPost(params struct {
Frame string
CountryIdsJSON []byte
ProvinceIdsJSON []byte
AllowLocal bool
AllowIPs []string
Frame string
CountryIdsJSON []byte
ProvinceIdsJSON []byte
AllowLocal bool
AllowIPs []string
AllowRememberLogin bool
Must *actions.Must
CSRF *actionutils.CSRF
@@ -127,6 +128,9 @@ func (this *IndexAction) RunPost(params struct {
// 允许本地
config.AllowLocal = params.AllowLocal
// 允许记住登录
config.AllowRememberLogin = params.AllowRememberLogin
err = configloaders.UpdateSecurityConfig(config)
if err != nil {
this.ErrorPage(err)