Skip to content

Commit

Permalink
fix: admin token (#2687)
Browse files Browse the repository at this point in the history
  • Loading branch information
icey-yu authored Sep 30, 2024
1 parent 6259a49 commit 953ed22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/common/storage/controller/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 953ed22

Please sign in to comment.