gestioCOF/kfet/auth/context_processors.py
2017-09-19 17:05:51 +02:00

10 lines
255 B
Python

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