From 953ed223131124e76e67f0efe634fe09e3fd0f72 Mon Sep 17 00:00:00 2001 From: icey-yu <119291641+icey-yu@users.noreply.github.com> Date: Mon, 30 Sep 2024 11:12:25 +0800 Subject: [PATCH] fix: admin token (#2687) --- pkg/common/storage/controller/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/storage/controller/auth.go b/pkg/common/storage/controller/auth.go index c94e2de2a..94f18b3ae 100644 --- a/pkg/common/storage/controller/auth.go +++ b/pkg/common/storage/controller/auth.go @@ -82,7 +82,7 @@ func (a *authDatabase) CreateToken(ctx context.Context, userID string, platformI const adminTokenMaxNum = 30 if platformID == constant.AdminPlatformID { if len(kickedTokenKey) > adminTokenMaxNum { - kickedTokenKey = kickedTokenKey[:adminTokenMaxNum] + kickedTokenKey = kickedTokenKey[:len(kickedTokenKey)-adminTokenMaxNum] } else { kickedTokenKey = nil }