From a688b6c60e6ba994f01515ca3ae8aea91c3538c7 Mon Sep 17 00:00:00 2001 From: Vishal Sharma Date: Sat, 27 Jul 2024 08:47:44 +0530 Subject: [PATCH] Revert "fix(saml): handle invalid email domain (#5564)" (#5579) This reverts commit ba7e6fcf235db0a81edd8f3ac9a44df94bc6f4f1. --- ee/query-service/dao/sqlite/auth.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ee/query-service/dao/sqlite/auth.go b/ee/query-service/dao/sqlite/auth.go index b8bc5e0fa0..4418b04cbf 100644 --- a/ee/query-service/dao/sqlite/auth.go +++ b/ee/query-service/dao/sqlite/auth.go @@ -20,14 +20,11 @@ import ( func (m *modelDao) createUserForSAMLRequest(ctx context.Context, email string) (*basemodel.User, basemodel.BaseApiError) { // get auth domain from email domain domain, apierr := m.GetDomainByEmail(ctx, email) + if apierr != nil { zap.L().Error("failed to get domain from email", zap.Error(apierr)) return nil, model.InternalErrorStr("failed to get domain from email") } - if domain == nil { - zap.L().Error("email domain does not match any authenticated domain", zap.String("email", email)) - return nil, model.InternalErrorStr("email domain does not match any authenticated domain") - } hash, err := baseauth.PasswordHash(utils.GeneratePassowrd()) if err != nil {