系统用户增加是否允许登录选项

This commit is contained in:
刘祥超
2021-03-30 11:00:06 +08:00
parent a553bad1ef
commit 129d2ccef0
8 changed files with 35 additions and 0 deletions

View File

@@ -36,6 +36,7 @@ func (this *AdminAction) RunGet(params struct {
"username": admin.Username,
"isOn": admin.IsOn,
"isSuper": admin.IsSuper,
"canLogin": admin.CanLogin,
}
// 权限

View File

@@ -31,6 +31,7 @@ func (this *CreatePopupAction) RunPost(params struct {
Pass2 string
ModuleCodes []string
IsSuper bool
CanLogin bool
// OTP
OtpOn bool
@@ -88,6 +89,7 @@ func (this *CreatePopupAction) RunPost(params struct {
Fullname: params.Fullname,
ModulesJSON: modulesJSON,
IsSuper: params.IsSuper,
CanLogin: params.CanLogin,
})
if err != nil {
this.ErrorPage(err)

View File

@@ -42,6 +42,7 @@ func (this *IndexAction) RunGet(params struct{}) {
"fullname": admin.Fullname,
"createdTime": timeutil.FormatTime("Y-m-d H:i:s", admin.CreatedAt),
"otpLoginIsOn": admin.OtpLogin != nil && admin.OtpLogin.IsOn,
"canLogin": admin.CanLogin,
})
}
this.Data["admins"] = adminMaps

View File

@@ -45,6 +45,7 @@ func (this *UpdateAction) RunGet(params struct {
"username": admin.Username,
"isOn": admin.IsOn,
"isSuper": admin.IsSuper,
"canLogin": admin.CanLogin,
"otpLoginIsOn": otpLoginIsOn,
}
@@ -76,6 +77,7 @@ func (this *UpdateAction) RunPost(params struct {
ModuleCodes []string
IsOn bool
IsSuper bool
CanLogin bool
// OTP
OtpOn bool
@@ -139,6 +141,7 @@ func (this *UpdateAction) RunPost(params struct {
ModulesJSON: modulesJSON,
IsSuper: params.IsSuper,
IsOn: params.IsOn,
CanLogin: params.CanLogin,
})
if err != nil {
this.ErrorPage(err)