Skip to content

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

fix: npe of new user (#15917)

boojack224af59e52e9
diff --git a/backend/api/v1/auth_service.go b/backend/api/v1/auth_service.go
index bafc91c71e..6d555d9d5a 100644
--- a/backend/api/v1/auth_service.go
+++ b/backend/api/v1/auth_service.go
@@ -441,7 +441,7 @@ func (s *AuthService) getOrCreateUserWithIDP(ctx context.Context, request *v1pb.
if userInfo.HasGroups {
// Sync user groups with the identity provider.
// The userInfo.Groups is the groups that the user belongs to in the identity provider.
- if err := s.syncUserGroups(ctx, user, userInfo.Groups); err != nil {
+ if err := s.syncUserGroups(ctx, newUser, userInfo.Groups); err != nil {
return nil, status.Errorf(codes.Internal, "failed to sync user groups: %v", err)
}
}