Changeset 4616 for waeup/branches
- Timestamp:
- 2 Jan 2010, 10:51:56 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/ulif-layout/src/waeup/authentication.py
r4612 r4616 36 36 loginfield = 'form.login' 37 37 passwordfield = 'form.password' 38 39 40 class Logout(grok.Viewlet):41 grok.viewletmanager(LeftSidebar)42 grok.context(IWAeUPObject)43 grok.order(3)44 # grok.require('zope.Public') # XXX: Does not work in ftests!45 46 def update(self):47 if 'form.logout' not in self.request.form.keys():48 return49 if not IUnauthenticatedPrincipal.providedBy(self.request.principal):50 auth = getUtility(IAuthentication)51 ILogout(auth).logout(self.request)52 # We redirect to ourself, as we want this page be loaded53 # without authentication (updating other viewlets on the54 # page)55 self.view.flash("You're logged out.")56 self.view.redirect(self.view.url())57 38 58 39 class PrincipalInfo(object):
Note: See TracChangeset for help on using the changeset viewer.