gestioCOF/kfet/auth/context_processors.py
2018-10-06 13:15:33 +02:00

7 lines
230 B
Python

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 {}