Exemple #1
0
 def update(self):
     """set values for pagelet"""
     BrowserPagelet.update(self)
     if not IUnauthenticatedPrincipal.providedBy(self.request.principal):
         auth = component.getUtility(IAuthentication)
         ILogout(auth).logout(self.request)
     if 'nextURL' in self.request:
         self.request.response.redirect(self.request['nextURL'])
Exemple #2
0
 def update(self):
     camefrom = self.request.get('camefrom', '.')
     if not IUnauthenticatedPrincipal.providedBy(self.request.principal):
         pau = zope.component.getUtility(IAuthentication)
         ILogout(pau).logout(self.request)
         if camefrom:
             return self.request.response.redirect(camefrom)
     if camefrom is None:
         ## get and use site instead of self.context?
         url = absoluteURL(self.context, self.request)
         return self.request.response.redirect(url)
     else:
         return self.request.response.redirect(camefrom)
Exemple #3
0
 def update(self):
     auth = zope.component.getUtility(IAuthentication)
     logout = ILogout(auth)
     logout.logout(self.request)
     pass
Exemple #4
0
 def update(self):
     if not IUnauthenticatedPrincipal.providedBy(self.request.principal):
         auth = getUtility(IAuthentication)
         ILogout(auth).logout(self.request)
Exemple #5
0
 def body(self):
     nextUrl = self.topMenu.url
     if not IUnauthenticatedPrincipal.providedBy(self.request.principal):
         auth = component.getUtility(IAuthentication)
         ILogout(auth).logout(self.request)
     return self.request.response.redirect(nextUrl)
Exemple #6
0
 def __call__(self):
     nextUrl = self.request.get('nextURL') or self.request.URL[-1]
     if not IUnauthenticatedPrincipal.providedBy(self.request.principal):
         auth = component.getUtility(IAuthentication)
         ILogout(auth).logout(self.request)
     return self.request.response.redirect(nextUrl)