This commit is contained in:
wangchuxiao
2023-03-16 12:00:14 +08:00
parent 642743957e
commit a8dd306196
3 changed files with 4 additions and 4 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ package tokenverify
import (
"context"
"fmt"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/tracelog"
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
@@ -78,7 +79,7 @@ func CheckAdmin(ctx context.Context) error {
if utils.IsContain(tracelog.GetOpUserID(ctx), config.Config.Manager.AppManagerUid) {
return nil
}
return errs.ErrIdentity.Wrap("operate user is not admin")
return errs.ErrIdentity.Wrap(fmt.Sprintf("user %s is not admin userID", tracelog.GetOpUserID(ctx)))
}
func ParseRedisInterfaceToken(redisToken interface{}) (*Claims, error) {