kpsul/kfet/auth/context_processors.py

11 lines
265 B
Python
Raw Permalink Normal View History

from django.contrib.auth.context_processors import PermWrapper
def temporary_auth(request):
if hasattr(request, 'real_user'):
return {
'user': request.real_user,
'perms': PermWrapper(request.real_user),
}
return {}