[MM-22037] Enable uppercase letters in the email (#13794)
* Enable uppercase letters in the email * Lowercase email on every input * Remove invalid test
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
28ef877876
Коммит
a7854f1b97
@@ -47,6 +47,7 @@ func userFromGitLabUser(glu *GitLabUser) *model.User {
|
||||
user.FirstName = glu.Name
|
||||
}
|
||||
user.Email = glu.Email
|
||||
user.Email = strings.ToLower(user.Email)
|
||||
userId := glu.getAuthData()
|
||||
user.AuthData = &userId
|
||||
user.AuthService = model.USER_AUTH_SERVICE_GITLAB
|
||||
|
||||
@@ -184,16 +184,6 @@ func TestIsValidEmail(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestValidLower(t *testing.T) {
|
||||
if !IsLower("corey+test@hulen.com") {
|
||||
t.Error("should be valid")
|
||||
}
|
||||
|
||||
if IsLower("Corey+test@hulen.com") {
|
||||
t.Error("should be invalid")
|
||||
}
|
||||
}
|
||||
|
||||
func TestEtag(t *testing.T) {
|
||||
etag := Etag("hello", 24)
|
||||
require.NotEqual(t, "", etag)
|
||||
|
||||
Ссылка в новой задаче
Block a user