from ploneintranet.userprofile.interfaces import IMemberGroupMembershipChangedEvent
from zope.interface import implementer
from zope.interface.interfaces import ObjectEvent


@implementer(IMemberGroupMembershipChangedEvent)
class MemberGroupMembershipChangedEvent(ObjectEvent):
    def __init__(self, membergroup, old_members, new_members):
        """
        Principals were added to, or removed from, a member group.
        """
        self.object = membergroup
        self.old_members = old_members
        self.new_members = new_members
