mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2026-03-06 02:27:05 +08:00
系统用户增加是否允许登录选项
This commit is contained in:
@@ -36,6 +36,7 @@ func (this *AdminAction) RunGet(params struct {
|
||||
"username": admin.Username,
|
||||
"isOn": admin.IsOn,
|
||||
"isSuper": admin.IsSuper,
|
||||
"canLogin": admin.CanLogin,
|
||||
}
|
||||
|
||||
// 权限
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user