From fd4ff8519160ffcad359c0f31003b3f3d872053d Mon Sep 17 00:00:00 2001 From: richjohnrambo Date: Sun, 20 Sep 2026 16:53:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=99=90=E5=88=B6IM=E7=A7=9F=E6=88=B7?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=B8=BA=E5=BD=93=E5=89=8D=E7=A7=9F=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/internal/logic/sys/im_tenant.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/internal/logic/sys/im_tenant.go b/server/internal/logic/sys/im_tenant.go index b2ac7c6..52820ba 100644 --- a/server/internal/logic/sys/im_tenant.go +++ b/server/internal/logic/sys/im_tenant.go @@ -76,6 +76,14 @@ func (s *sSysImTenant) List(ctx context.Context, in *sysin.ImTenantListInp) (lis dao.ImTenant.Columns().UpdatedAt, ) + if !isImPlatformAdmin(ctx, contexts.GetUserId(ctx)) { + tenantId := contexts.GetTenantId(ctx) + if tenantId <= 0 { + err = gerror.New("当前管理员未关联IM租户") + return + } + mod = mod.Where(dao.ImTenant.Columns().Id, tenantId) + } if in.Id > 0 { mod = mod.Where(dao.ImTenant.Columns().Id, in.Id) }