~barry/mailman/events-and-web

« back to all changes in this revision

Viewing changes to src/mailman/app/membership.py

  • Committer: Barry Warsaw
  • Date: 2012-10-16 22:40:12 UTC
  • Revision ID: barry@list.org-20121016224012-xxrd5zgkwdrmh9y4
Database
--------
 * The `ban` table now uses list-ids to cross-reference the mailing list,
   since these cannot change even if the mailing list is moved or renamed.

Interfaces
----------
 * The `IBanManager` is no longer a global utility.  Instead, you adapt an
   `IMailingList` to an `IBanManager` to manage the bans for a specific
   mailing list.  To manage the global bans, adapt ``None``.

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
    # Let's be extra cautious.
74
74
    getUtility(IEmailValidator).validate(email)
75
75
    # Check to see if the email address is banned.
76
 
    if getUtility(IBanManager).is_banned(email, mlist.fqdn_listname):
 
76
    if IBanManager(mlist).is_banned(email):
77
77
        raise MembershipIsBannedError(mlist, email)
78
78
    # See if there's already a user linked with the given address.
79
79
    user_manager = getUtility(IUserManager)