[MM-13839] Check for password when updating the eMail (#10207)

* Check for password when updating the eMail

* Require password for email change

* Enhance unit testing

* Restructure error handling for update email path

* govet
Этот коммит содержится в:
Daniel Schalla
2019-02-02 00:06:49 +01:00
коммит произвёл Carlos Tadeu Panato Junior
родитель 9a3dc21adc
Коммит 85c60f1402
5 изменённых файлов: 72 добавлений и 9 удалений

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

@@ -57,7 +57,7 @@ func (a *App) CheckPasswordAndAllCriteria(user *model.User, password string, mfa
}
// This to be used for places we check the users password when they are already logged in
func (a *App) doubleCheckPassword(user *model.User, password string) *model.AppError {
func (a *App) DoubleCheckPassword(user *model.User, password string) *model.AppError {
if err := checkUserLoginAttempts(user, *a.Config().ServiceSettings.MaximumLoginAttempts); err != nil {
return err
}