mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-08 19:16:35 +08:00
Error code standardization
This commit is contained in:
@@ -9,7 +9,6 @@ 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"
|
||||
@@ -160,19 +159,6 @@ func CheckAccess(ctx context.Context, OpUserID string, OwnerUserID string) bool
|
||||
return false
|
||||
}
|
||||
|
||||
func CheckAccessV2(ctx context.Context, OpUserID string, OwnerUserID string) (err error) {
|
||||
defer func() {
|
||||
trace_log.SetCtxInfo(ctx, utils.GetFuncName(1), err, "OpUserID", OpUserID, "OwnerUserID", OwnerUserID)
|
||||
}()
|
||||
if utils.IsContain(OpUserID, config.Config.Manager.AppManagerUid) {
|
||||
return nil
|
||||
}
|
||||
if OpUserID == OwnerUserID {
|
||||
return nil
|
||||
}
|
||||
return utils.Wrap(constant.ErrIdentity, open_utils.GetSelfFuncName())
|
||||
}
|
||||
|
||||
func CheckAccessV3(ctx context.Context, OwnerUserID string) (err error) {
|
||||
opUserID := tools.OpUserID(ctx)
|
||||
defer func() {
|
||||
|
||||
Reference in New Issue
Block a user