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'])
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)
def update(self): auth = zope.component.getUtility(IAuthentication) logout = ILogout(auth) logout.logout(self.request) pass
def update(self): if not IUnauthenticatedPrincipal.providedBy(self.request.principal): auth = getUtility(IAuthentication) ILogout(auth).logout(self.request)
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)
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)