Filtered gateways by team_id (#5929)