PLT-340 allow team directory and open invites

This commit is contained in:
=Corey Hulen
2015-10-27 23:28:37 -07:00
parent f0b209fee7
commit 46e2e3ebd9

View File

@@ -280,8 +280,14 @@ func (s SqlTeamStore) GetAllTeamListing() StoreChannel {
go func() {
result := StoreResult{}
query := "SELECT * FROM Teams WHERE AllowTeamListing = 1"
if utils.Cfg.SqlSettings.DriverName == model.DATABASE_DRIVER_POSTGRES {
query = "SELECT * FROM Teams WHERE AllowTeamListing = true"
}
var data []*model.Team
if _, err := s.GetReplica().Select(&data, "SELECT * FROM Teams WHERE AllowTeamListing = 1"); err != nil {
if _, err := s.GetReplica().Select(&data, query); err != nil {
result.Err = model.NewAppError("SqlTeamStore.GetAllTeams", "We could not get all teams", err.Error())
}