自动检查管理员弱密码并提醒

This commit is contained in:
GoEdgeLab
2023-04-04 17:26:28 +08:00
parent 09a0846fb6
commit 5daa0d6108
9 changed files with 87 additions and 34 deletions

View File

@@ -276,5 +276,13 @@ func (this *IndexAction) RunPost(params struct{}) {
}
}
// 弱密码提示
countWeakAdminsResp, err := this.RPC().AdminRPC().CountAllEnabledAdmins(this.AdminContext(), &pb.CountAllEnabledAdminsRequest{HasWeakPassword: true})
if err != nil {
this.ErrorPage(err)
return
}
this.Data["countWeakAdmins"] = countWeakAdminsResp.Count
this.Success()
}