[Checkins] SVN: PluggableAuthService/branches/z3-events/ Add some
event classes
Wichert Akkerman
wichert at wiggy.net
Sun Dec 3 08:27:29 EST 2006
Log message for revision 71383:
Add some event classes
Changed:
A PluggableAuthService/branches/z3-events/events.py
U PluggableAuthService/branches/z3-events/interfaces/events.py
-=-
Added: PluggableAuthService/branches/z3-events/events.py
===================================================================
--- PluggableAuthService/branches/z3-events/events.py 2006-12-03 13:16:02 UTC (rev 71382)
+++ PluggableAuthService/branches/z3-events/events.py 2006-12-03 13:27:29 UTC (rev 71383)
@@ -0,0 +1,35 @@
+from interfaces.events import *
+
+class PASEvent(object):
+ implements(IPASEvent)
+
+ def __init__(self, id):
+ self.id=id
+
+
+class UserCreated(PASEvent):
+ implements(IUserCreated)
+
+ def __init__(self, id, login):
+ self.id=id
+ self.login=login
+
+
+class UserDeleted(PASEvent):
+ implements(IUserDeleted)
+
+
+class UserCredentialsUpdated(PASEvent):
+ implements(IUserCredentialsUpdated)
+
+ def __init__(self, id, password):
+ self.id=id
+ self.password=password
+
+
+class UserPropertiesUpdated(PASEvent):
+ implements(IUserPropertiesUpdated)
+
+ def __init__(self, id, properties):
+ self.id=id
+ self.properties=properties
Property changes on: PluggableAuthService/branches/z3-events/events.py
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: PluggableAuthService/branches/z3-events/interfaces/events.py
===================================================================
--- PluggableAuthService/branches/z3-events/interfaces/events.py 2006-12-03 13:16:02 UTC (rev 71382)
+++ PluggableAuthService/branches/z3-events/interfaces/events.py 2006-12-03 13:27:29 UTC (rev 71383)
@@ -1,29 +1,42 @@
from zope.interface import Attribute, Interface
-class IUserCreated(Interface):
+class IPASEvent(Interface):
+ """An event related to a PAS principal.
+ """
+
+ id = Attribute('Principal id')
+
+
+class IPASUserEvent(IPASEvent):
+ """An event related to a PAS user.
+ """
+
+
+class IPASGroupEvent(IPASEvent):
+ """An event related to a PAS group.
+ """
+
+
+class IUserCreated(IPASUserEvent):
"""A new user has been registered.
"""
- userid = Attribute('User id')
login = Attribute('Login name')
-class IUserDeleted(interface.Interface):
+class IUserDeleted(IPASUserEvent):
"""A user has been removed.
"""
- userid = Attribute('User id')
-class IUserCredentialsUpdated(interface.Interface):
+class IUserCredentialsUpdated(IPASUserEvent):
"""A user has changed her password.
"""
- userid = Attribute('User id')
password = Attribute('The new password')
-class IUserPropertiesUpdated(interface.Interface):
+class IUserPropertiesUpdated(IPASUserEvent):
"""A users properties have been updated.
"""
- userid = Attribute('User id')
properties = Attribute('List of modified properties')
More information about the Checkins
mailing list