From 25ecea7e091851c7bb7f11762627b0af308421cb Mon Sep 17 00:00:00 2001 From: yanweidong Date: Fri, 15 Mar 2024 15:28:53 +0800 Subject: [PATCH] fix bug --- go.mod | 2 +- service/context.go | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 4c11a0c..baa2731 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module git.apinb.com/bsm-sdk/engine -go 1.22 \ No newline at end of file +go 1.22 diff --git a/service/context.go b/service/context.go index 6a53e4a..3d52993 100644 --- a/service/context.go +++ b/service/context.go @@ -7,7 +7,6 @@ import ( "git.apinb.com/bsm-sdk/engine/encipher" "git.apinb.com/bsm-sdk/engine/exception" "git.apinb.com/bsm-sdk/engine/types" - "git.apinb.com/bsm-sdk/engine/utils" "google.golang.org/grpc/metadata" ) @@ -38,11 +37,6 @@ func ParseMetaCtx(ctx context.Context, opts *ParseOptions) (*types.JwtClaims, er if !strings.Contains(claims.Role, opts.RoleValue) { return nil, exception.ErrPermissionDenied } - if opts.MustPrivateAllow { - if utils.IsPublicIP(claims.Client) { - return nil, exception.ErrPermissionDenied - } - } } return claims, nil