MM-18081 Except bots from team email domain restrictions (#12041)

* Except bots from team email domain restrictions

* Fix style
Этот коммит содержится в:
Joram Wilander
2019-09-06 10:55:55 -04:00
коммит произвёл GitHub
родитель adb1a98760
Коммит 50e97bd9d3
2 изменённых файлов: 15 добавлений и 2 удалений

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

@@ -89,6 +89,9 @@ func (a *App) isTeamEmailAddressAllowed(email string, allowedDomains string) boo
}
func (a *App) isTeamEmailAllowed(user *model.User, team *model.Team) bool {
if user.IsBot {
return true
}
email := strings.ToLower(user.Email)
return a.isTeamEmailAddressAllowed(email, team.AllowedDomains)
}