mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-30 14:32:37 +08:00
Merge remote-tracking branch 'origin/errcode' into errcode
This commit is contained in:
commit
692ec1f8c2
@ -31,6 +31,7 @@ var (
|
||||
ErrInternalServer = ErrInfo{ServerInternalError, "ServerInternalError", ""}
|
||||
ErrNetwork = ErrInfo{NetworkError, "NetworkError", ""}
|
||||
ErrNoPermission = ErrInfo{NoPermissionError, "NoPermissionError", ""}
|
||||
ErrIdentity = ErrInfo{IdentityError, "IdentityError", ""}
|
||||
ErrCallback = ErrInfo{ErrMsg: "CallbackError"}
|
||||
ErrCallbackContinue = ErrInfo{ErrMsg: "CallbackContinueError"}
|
||||
|
||||
@ -141,6 +142,8 @@ const (
|
||||
|
||||
DefaultOtherError = 90006 //其他错误
|
||||
DataError = 90007 //数据错误
|
||||
|
||||
IdentityError = 90008 // 身份错误 非管理员token,且token中userID与请求userID不一致
|
||||
)
|
||||
|
||||
// 账号错误码
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
"Open_IM/pkg/common/trace_log"
|
||||
"Open_IM/pkg/utils"
|
||||
"context"
|
||||
"github.com/OpenIMSDK/open_utils"
|
||||
"time"
|
||||
|
||||
go_redis "github.com/go-redis/redis/v8"
|
||||
@ -161,7 +162,7 @@ func CheckAccessV2(ctx context.Context, OpUserID string, OwnerUserID string) (er
|
||||
if OpUserID == OwnerUserID {
|
||||
return nil
|
||||
}
|
||||
return utils.Wrap(constant.ErrData, "")
|
||||
return utils.Wrap(constant.ErrData, open_utils.GetSelfFuncName())
|
||||
}
|
||||
|
||||
func GetUserIDFromToken(token string, operationID string) (bool, string, string) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user