diff --git a/api/team.go b/api/team.go index 18acf33ce6..f6038566a8 100644 --- a/api/team.go +++ b/api/team.go @@ -411,6 +411,7 @@ func findTeams(c *Context, w http.ResponseWriter, r *http.Request) { teams := result.Data.([]*model.Team) m := make(map[string]*model.Team) for _, v := range teams { + v.Sanitize() m[v.Id] = v } diff --git a/model/team.go b/model/team.go index c0f6524cd5..584c78f8d8 100644 --- a/model/team.go +++ b/model/team.go @@ -219,3 +219,9 @@ func CleanTeamName(s string) string { func (o *Team) PreExport() { } + +func (o *Team) Sanitize() { + o.Email = "" + o.Type = "" + o.AllowedDomains = "" +}