From 197fb8e87e8837d07ae59007accee29b59fb05b4 Mon Sep 17 00:00:00 2001 From: Leufolium Date: Thu, 25 Apr 2024 16:40:21 +0800 Subject: [PATCH] by Robin at 20240425 --- app/mix/service/business_validator/auth.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/mix/service/business_validator/auth.go b/app/mix/service/business_validator/auth.go index ea1f50ee..5e03db14 100644 --- a/app/mix/service/business_validator/auth.go +++ b/app/mix/service/business_validator/auth.go @@ -402,6 +402,11 @@ func (l *AuthBusinessValidator) EnsureAccountPunishmentHasNotTerminated(id int64 func (l *AuthBusinessValidator) EnsureAccountPunishmentMatchesRoleOfTarget(uid int64, typ int64, QueryFunc func(ctx *gin.Context, req *accountproto.OpListByMidReq) (*dbstruct.Account, error)) *AuthBusinessValidator { l.oplist = append(l.oplist, func() { + + if len(consts.AccountPunishmentRoleMap[typ]) == 0 { + return + } + acct, err := QueryFunc(l.ctx, &accountproto.OpListByMidReq{ Mid: goproto.Int64(uid), })