mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-08-10 21:19:52 +08:00
CheckAccess
This commit is contained in:
parent
08bffa60f4
commit
028c2ac364
@ -5,6 +5,7 @@ import (
|
|||||||
"Open_IM/pkg/common/constant"
|
"Open_IM/pkg/common/constant"
|
||||||
commonDB "Open_IM/pkg/common/db"
|
commonDB "Open_IM/pkg/common/db"
|
||||||
"Open_IM/pkg/common/log"
|
"Open_IM/pkg/common/log"
|
||||||
|
"Open_IM/pkg/common/trace_log"
|
||||||
"Open_IM/pkg/utils"
|
"Open_IM/pkg/utils"
|
||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
@ -150,7 +151,10 @@ func CheckAccess(ctx context.Context, OpUserID string, OwnerUserID string) bool
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func CheckAccessV2(ctx context.Context, OpUserID string, OwnerUserID string) error {
|
func CheckAccessV2(ctx context.Context, OpUserID string, OwnerUserID string) (err error) {
|
||||||
|
defer func() {
|
||||||
|
trace_log.SetContextInfo(ctx, utils.GetFuncName(1), err, "OpUserID", OpUserID, "OwnerUserID", OwnerUserID)
|
||||||
|
}()
|
||||||
if utils.IsContain(OpUserID, config.Config.Manager.AppManagerUid) {
|
if utils.IsContain(OpUserID, config.Config.Manager.AppManagerUid) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user