1
2
3
4
5
6
7
8
9
10
11 from Products.PluggableAuthService.interfaces.events import IUserLoggedInEvent
12 from Products.PluggableAuthService.interfaces.events import IUserLoggedOutEvent
13 from Products.PluggableAuthService.events import PASEvent
14 from zope.interface import implements, Interface, Attribute
15 from zope.event import notify
16 from ZODB.transact import transact
17
19 """
20 Login notification event.
21
22 Subscribe to this to run code when a user logs in.
23 The username can be obtained in the handler via: evt.object.id
24
25 WARNING: Currently it doesn't notify when switching directly from
26 a non-admin user to the admin user without logging out,
27 because we're unable to determine whether the login succeeded.
28 """
29 implements(IUserLoggedInEvent)
30
31
33 """
34 Manual logout notification event.
35
36 This does not fire for session timeouts.
37 """
38 implements(IUserLoggedOutEvent)
39
41 """
42 Returns the Zope application.
43 """
44 app = Attribute("The Zope Application")
45
51
64