mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-03 15:00:27 +08:00
查询弱密码管理员时只查询已启用的管理员
This commit is contained in:
@@ -275,6 +275,7 @@ func (this *AdminDAO) CountAllEnabledAdmins(tx *dbs.Tx, keyword string, hasWeakP
|
||||
}
|
||||
if hasWeakPasswords {
|
||||
query.Attr("password", weakPasswords)
|
||||
query.Attr("isOn", true)
|
||||
}
|
||||
return query.
|
||||
State(AdminStateEnabled).
|
||||
@@ -290,6 +291,7 @@ func (this *AdminDAO) ListEnabledAdmins(tx *dbs.Tx, keyword string, hasWeakPassw
|
||||
}
|
||||
if hasWeakPasswords {
|
||||
query.Attr("password", weakPasswords)
|
||||
query.Attr("isOn", true)
|
||||
}
|
||||
|
||||
_, err = query.
|
||||
|
||||
Reference in New Issue
Block a user