[MM-17213] Fix domain check when inviting guests and update user checks (#11793)

* Add update user check for guests and tests

* [MM-17213] Fix domain check when inviting guests

* Fix i18n strings

* Fix tests

* Add missing translation

* Adds test case for non guest user
Этот коммит содержится в:
Miguel de la Cruz
2019-08-14 16:07:58 +02:00
коммит произвёл GitHub
родитель da768d677e
Коммит b36eb415d1
5 изменённых файлов: 74 добавлений и 40 удалений

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

@@ -1103,7 +1103,7 @@ func (a *App) InviteGuestsToChannels(teamId string, guestsInvite *model.GuestsIn
var invalidEmailList []string
for _, email := range guestsInvite.Emails {
if !a.isTeamEmailAddressAllowed(email, team.AllowedDomains) {
if !CheckEmailDomain(email, *a.Config().GuestAccountsSettings.RestrictCreationToDomains) {
invalidEmailList = append(invalidEmailList, email)
}
}