gestioCOF/kfet/decorators.py

7 lines
185 B
Python
Raw Normal View History

from django_cas_ng.decorators import user_passes_test
def kfet_is_team(user):
return user.has_perm('kfet.is_team')
teamkfet_required = user_passes_test(lambda u: kfet_is_team(u))