Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: typo (#18832)

p0ny1b1fac0be430
diff --git a/backend/api/auth/auth.go b/backend/api/auth/auth.go
index 9873d4902d..3e6c78dcfd 100644
--- a/backend/api/auth/auth.go
+++ b/backend/api/auth/auth.go
@@ -91,7 +91,7 @@ func (in *APIAuthInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFun
user, err := in.getUserConnect(ctx, accessTokenStr)
if err != nil {
- if IsAuthenticationAllowed(req.Spec().Procedure, authContext) {
+ if IsAuthenticationSkipped(req.Spec().Procedure, authContext) {
return next(ctx, req)
}
return nil, err
@@ -125,7 +125,7 @@ func (in *APIAuthInterceptor) WrapStreamingHandler(next connect.StreamingHandler
user, err := in.getUserConnect(ctx, accessTokenStr)
if err != nil {
- if IsAuthenticationAllowed(conn.Spec().Procedure, authContext) {
+ if IsAuthenticationSkipped(conn.Spec().Procedure, authContext) {
return next(ctx, conn)
}
return err
diff --git a/backend/api/auth/config.go b/backend/api/auth/config.go
index f5faff603d..defee6a3fe 100644
--- a/backend/api/auth/config.go
+++ b/backend/api/auth/config.go
@@ -6,8 +6,8 @@ import (
"github.com/bytebase/bytebase/backend/common"
)
-// IsAuthenticationAllowed returns whether the method is exempted from authentication.
-func IsAuthenticationAllowed(fullMethodName string, authContext *common.AuthContext) bool {
+// IsAuthenticationSkipped returns whether the method is exempted from authentication.
+func IsAuthenticationSkipped(fullMethodName string, authContext *common.AuthContext) bool {
// "/grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo" is used
// for reflection.
if strings.HasPrefix(fullMethodName, "/grpc.reflection") {
diff --git a/backend/api/v1/acl.go b/backend/api/v1/acl.go
index e1746a0e8b..0ab17ad988 100644
--- a/backend/api/v1/acl.go
+++ b/backend/api/v1/acl.go
@@ -130,7 +130,7 @@ func (in *ACLInterceptor) doACLCheck(ctx context.Context, request any, fullMetho
return connect.NewError(connect.CodeInternal, errors.Errorf("failed to populate raw resources %s", err))
}
- if auth.IsAuthenticationAllowed(fullMethod, authContext) {
+ if auth.IsAuthenticationSkipped(fullMethod, authContext) {
return nil
}
@@ -206,7 +206,7 @@ func hasPath(fieldMask *fieldmaskpb.FieldMask, want string) bool {
}
func doIAMPermissionCheck(ctx context.Context, iamManager *iam.Manager, fullMethod string, user *store.UserMessage, authContext *common.AuthContext) (bool, []string, error) {
- if auth.IsAuthenticationAllowed(fullMethod, authContext) {
+ if auth.IsAuthenticationSkipped(fullMethod, authContext) {
return true, nil, nil
}
if authContext.AuthMethod != common.AuthMethodIAM {