code: func GetTeamsByUser(query *m.GetTeamsByUserQuery) error {
  	query.Result = make([]*m.TeamDTO, 0)
  
  	var sql bytes.Buffer
  
  	sql.WriteString(getTeamSelectSqlBase())
  	sql.WriteString(` INNER JOIN team_member on team.id = team_member.team_id`)
  	sql.WriteString(` WHERE team.org_id = ? and team_member.user_id = ?`)
  
  	err := x.SQL(sql.String(), query.OrgId, query.UserId).Find(&query.Result)
  	return err
  }
docs: // GetTeamsByUser is used by the Guardian when checking a users' permissions