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