# HG changeset patch # User Sverre Rabbelier # Date 1232729686 0 # Node ID f790f77ba6b7ddb8d90ebc3baf134e954da3c8af # Parent 390c8a98cdd0a176012edeb9860b376b29dfc32c Restore context in deny() page Now that we know when the sidebar is doing the access checks we can safely construct a new context in deny (without having to worry that it will try to do more access checks that result in deny, which will call for a new context... etc). Patch by: Sverre Rabbelier diff -r 390c8a98cdd0 -r f790f77ba6b7 app/soc/views/helper/access.py --- a/app/soc/views/helper/access.py Fri Jan 23 16:53:19 2009 +0000 +++ b/app/soc/views/helper/access.py Fri Jan 23 16:54:46 2009 +0000 @@ -126,7 +126,14 @@ Raises: always raises AccessViolationResponse if called """ - context = {} + + import soc.views.helper.responses + + if kwargs.get('SIDEBAR_CALLING', False): + context = {} + else: + context = soc.views.helper.responses.getUniversalContext(request) + context['title'] = 'Access denied' raise out_of_band.AccessViolation(DEF_PAGE_DENIED_MSG, context=context)