[MM-13840] Change eMail as a post-verification action (#10253)

* Change eMail as a post-verification action

* Fix broken test

* comment for special behavior, tests

* govet

* Check for already existent eMails when require email verification is turned on before accepting update
Этот коммит содержится в:
Daniel Schalla
2019-02-20 15:50:52 +01:00
коммит произвёл GitHub
родитель 1218e774ba
Коммит f046163a12
16 изменённых файлов: 190 добавлений и 48 удалений

Просмотреть файл

@@ -304,12 +304,12 @@ func TestWebSocketStatuses(t *testing.T) {
user := model.User{Email: strings.ToLower(model.NewId()) + "success+test@simulator.amazonses.com", Nickname: "Corey Hulen", Password: "passwd1"}
ruser := Client.Must(Client.CreateUser(&user)).(*model.User)
th.LinkUserToTeam(ruser, rteam)
store.Must(th.App.Srv.Store.User().VerifyEmail(ruser.Id))
store.Must(th.App.Srv.Store.User().VerifyEmail(ruser.Id, ruser.Email))
user2 := model.User{Email: strings.ToLower(model.NewId()) + "success+test@simulator.amazonses.com", Nickname: "Corey Hulen", Password: "passwd1"}
ruser2 := Client.Must(Client.CreateUser(&user2)).(*model.User)
th.LinkUserToTeam(ruser2, rteam)
store.Must(th.App.Srv.Store.User().VerifyEmail(ruser2.Id))
store.Must(th.App.Srv.Store.User().VerifyEmail(ruser2.Id, ruser2.Email))
Client.Login(user.Email, user.Password)