Merge remote-tracking branch 'origin/v3dev' into v3dev

This commit is contained in:
withchao
2023-07-03 20:54:21 +08:00
5 changed files with 19 additions and 28 deletions
+2 -2
View File
@@ -68,7 +68,7 @@ func CheckAccessV3(ctx context.Context, ownerUserID string) (err error) {
if opUserID == ownerUserID {
return nil
}
return errs.ErrIdentity.Wrap(utils.GetSelfFuncName())
return errs.ErrNoPermission.Wrap(utils.GetSelfFuncName())
}
func IsAppManagerUid(ctx context.Context) bool {
@@ -79,7 +79,7 @@ func CheckAdmin(ctx context.Context) error {
if utils.IsContain(mcontext.GetOpUserID(ctx), config.Config.Manager.UserID) {
return nil
}
return errs.ErrIdentity.Wrap(fmt.Sprintf("user %s is not admin userID", mcontext.GetOpUserID(ctx)))
return errs.ErrNoPermission.Wrap(fmt.Sprintf("user %s is not admin userID", mcontext.GetOpUserID(ctx)))
}
func ParseRedisInterfaceToken(redisToken interface{}) (*Claims, error) {