Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: allow set empty phone (#6594)
boojack0987121e4062
diff --git a/backend/api/v1/auth_service.go b/backend/api/v1/auth_service.goindex 8ad98448d7..1f06ebfcf4 100644--- a/backend/api/v1/auth_service.go+++ b/backend/api/v1/auth_service.go@@ -324,11 +324,10 @@ func (s *AuthService) UpdateUser(ctx context.Context, request *v1pb.UpdateUserRepatch.MFAConfig = &storepb.MFAConfig{}}case "phone":- if request.User.Phone == "" {- return nil, status.Errorf(codes.InvalidArgument, "phone number cannot be empty")- }- if err := validatePhone(request.User.Phone); err != nil {- return nil, status.Errorf(codes.InvalidArgument, "invalid phone number %q, error: %v", request.User.Phone, err)+ if request.User.Phone != "" {+ if err := validatePhone(request.User.Phone); err != nil {+ return nil, status.Errorf(codes.InvalidArgument, "invalid phone number %q, error: %v", request.User.Phone, err)+ }}patch.Phone = &request.User.Phone}diff --git a/frontend/src/views/ProfileDashboard.vue b/frontend/src/views/ProfileDashboard.vueindex 8e293ab059..ab11b335d3 100644--- a/frontend/src/views/ProfileDashboard.vue+++ b/frontend/src/views/ProfileDashboard.vue@@ -397,7 +397,7 @@ const saveEdit = async () => {if (userPatch.email !== user.value.email) {updateMask.push("email");}- if (userPatch.phone && userPatch.phone !== user.value.phone) {+ if (userPatch.phone !== user.value.phone) {updateMask.push("phone");}if (userPatch.password !== user.value.email) {