Changeset 4616 for waeup


Ignore:
Timestamp:
2 Jan 2010, 10:51:56 (15 years ago)
Author:
uli
Message:

Remove logout viewlet. Logout is now part of standard site layout.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • waeup/branches/ulif-layout/src/waeup/authentication.py

    r4612 r4616  
    3636    loginfield = 'form.login'
    3737    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             return
    49         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 loaded
    53             # without authentication (updating other viewlets on the
    54             # page)
    55             self.view.flash("You're logged out.")
    56             self.view.redirect(self.view.url())
    5738
    5839class PrincipalInfo(object):
Note: See TracChangeset for help on using the changeset viewer.