def __call__(self): cache = DebugSecurityPolicy.getCache(self.request) sp_cache_enabled = None if cache is not None: sp_cache_enabled = cache['enabled'] cache['enabled'] = False result = Unauthorized.__call__(self) if self.request.response.getStatus() in (302, 303): self.next_url = self.request.response.getHeader('location') self.request.response.setHeader('location', '') self.request.response.setStatus(200) result = self.template() if cache is not None: cache['enabled'] = sp_cache_enabled return result
def render(self, *args, **kw): return Unauthorized.__call__(self)