(email string)
| 749 | } |
| 750 | |
| 751 | func validateEndUserEmail(email string) error { |
| 752 | if common.IsServiceAccountEmail(email) { |
| 753 | return connect.NewError(connect.CodeInvalidArgument, errors.Errorf("email for end users cannot end with %v", common.ServiceAccountSuffix)) |
| 754 | } |
| 755 | if common.IsWorkloadIdentityEmail(email) { |
| 756 | return connect.NewError(connect.CodeInvalidArgument, errors.Errorf("email for end users cannot end with %v", common.WorkloadIdentitySuffix)) |
| 757 | } |
| 758 | return nil |
| 759 | } |
| 760 | |
| 761 | func validateEmailWithDomains(ctx context.Context, licenseService *enterprise.LicenseService, stores *store.Store, workspaceID, email string, checkDomainSetting bool) error { |
| 762 | if err := validateEndUserEmail(email); err != nil { |
no test coverage detected