mirror of https://github.com/bjdgyc/anylink.git
修复前端会显示已禁用管理器信息的bug
This commit is contained in:
parent
cad74d7fdb
commit
9d5b7070d9
|
@ -128,7 +128,7 @@ func (lm *LockManager) GetLocksInfo() []LockInfo {
|
|||
defer lm.mu.Unlock()
|
||||
|
||||
for ip, state := range lm.ipLocks {
|
||||
if state.Locked {
|
||||
if base.Cfg.MaxGlobalIPBanCount > 0 && state.Locked {
|
||||
info := LockInfo{
|
||||
Description: "全局IP锁定",
|
||||
Username: "",
|
||||
|
@ -145,7 +145,7 @@ func (lm *LockManager) GetLocksInfo() []LockInfo {
|
|||
}
|
||||
|
||||
for username, state := range lm.userLocks {
|
||||
if state.Locked {
|
||||
if base.Cfg.MaxGlobalUserBanCount > 0 && state.Locked {
|
||||
info := LockInfo{
|
||||
Description: "全局用户锁定",
|
||||
Username: username,
|
||||
|
@ -163,7 +163,7 @@ func (lm *LockManager) GetLocksInfo() []LockInfo {
|
|||
|
||||
for username, ipStates := range lm.ipUserLocks {
|
||||
for ip, state := range ipStates {
|
||||
if state.Locked {
|
||||
if base.Cfg.MaxBanCount > 0 && state.Locked {
|
||||
info := LockInfo{
|
||||
Description: "单用户IP锁定",
|
||||
Username: username,
|
||||
|
|
Loading…
Reference in New Issue