~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/model/person.py

  • Committer: Curtis Hovey
  • Date: 2012-01-06 01:03:46 UTC
  • mto: This revision was merged to the branch mainline in revision 14651.
  • Revision ID: curtis.hovey@canonical.com-20120106010346-moe23t29oj0x1bo0
Use _teamPrivacyQuery to filter out non-visible teams.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3590
3590
        orderby = (Desc(Person.datecreated), Desc(Person.id))
3591
3591
        result = IStore(Person).find(
3592
3592
            Person,
3593
 
            Person.teamowner != None,
3594
 
            Person.merged == None)
3595
 
        return result.order_by(orderby)[:limit]
 
3593
            And(
 
3594
                self._teamPrivacyQuery(),
 
3595
                TeamParticipation.team == Person.id,
 
3596
                Not(Person.teamowner == None),
 
3597
                Person.merged == None))
 
3598
        return result.order_by(orderby).config(distinct=True)[:limit]
3596
3599
 
3597
3600
    def _merge_person_decoration(self, to_person, from_person, skip,
3598
3601
        decorator_table, person_pointer_column, additional_person_columns):