查询弱密码管理员时只查询已启用的管理员

This commit is contained in:
刘祥超
2023-04-09 17:31:09 +08:00
parent a7abca6c09
commit 39cb95184d

View File

@@ -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.