##// END OF EJS Templates
events: Add user data to UserPreCreate und UserPreUpdate events.
johbo -
r228:d4ffc03c default
parent child Browse files
Show More
@@ -38,8 +38,8 b' class UserPreCreate(object):'
38 An instance of this class is emitted as an :term:`event` before a new user
38 An instance of this class is emitted as an :term:`event` before a new user
39 object is created.
39 object is created.
40 """
40 """
41 def __init__(self, active):
41 def __init__(self, user_data):
42 self.active = active
42 self.user_data = user_data
43
43
44
44
45 @implementer(IUserPreUpdate)
45 @implementer(IUserPreUpdate)
@@ -48,6 +48,6 b' class UserPreUpdate(object):'
48 An instance of this class is emitted as an :term:`event` before a user
48 An instance of this class is emitted as an :term:`event` before a user
49 object is updated.
49 object is updated.
50 """
50 """
51 def __init__(self, user, active):
51 def __init__(self, user, user_data):
52 self.user = user
52 self.user = user
53 self.active = active
53 self.user_data = user_data
@@ -30,9 +30,9 b' class IUserRegistered(Interface):'
30
30
31 class IUserPreCreate(Interface):
31 class IUserPreCreate(Interface):
32 """
32 """
33 An event type that is emitted before a new user object is persisted.
33 An event type that is emitted before a new user object is created.
34 """
34 """
35 active = Attribute('Value for user.active')
35 user_data = Attribute('Data used to create the new user')
36
36
37
37
38 class IUserPreUpdate(Interface):
38 class IUserPreUpdate(Interface):
@@ -40,4 +40,4 b' class IUserPreUpdate(Interface):'
40 An event type that is emitted before a user object is updated.
40 An event type that is emitted before a user object is updated.
41 """
41 """
42 user = Attribute('The not yet updated user object')
42 user = Attribute('The not yet updated user object')
43 active = Attribute('New value for user.active')
43 user_data = Attribute('Data used to update the user')
General Comments 0
You need to be logged in to leave comments. Login now