~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/mail/notification.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-07-26 21:48:06 UTC
  • mfrom: (13506.6.3 bug-815623)
  • Revision ID: launchpad@pqm.canonical.com-20110726214806-v2j41ddaem16f6wa
[r=wgrant][bug=815623] Do not notify team admins about membership
 changes in open teams.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
from canonical.launchpad.webapp.publisher import canonical_url
37
37
from canonical.launchpad.webapp.url import urlappend
38
38
from lp.registry.interfaces.mailinglist import IHeldMessageDetails
39
 
from lp.registry.interfaces.person import IPersonSet
 
39
from lp.registry.interfaces.person import (
 
40
    IPersonSet,
 
41
    TeamSubscriptionPolicy,
 
42
    )
40
43
from lp.registry.interfaces.teammembership import (
41
44
    ITeamMembershipSet,
42
45
    TeamMembershipStatus,
177
180
    if not admin_addrs:
178
181
        return
179
182
 
 
183
    # Open teams do not notify admins about new members.
 
184
    if team.subscriptionpolicy == TeamSubscriptionPolicy.OPEN:
 
185
        return
 
186
 
180
187
    replacements = {
181
188
        'person_name': "%s (%s)" % (person.displayname, person.name),
182
189
        'team_name': "%s (%s)" % (team.displayname, team.name),