kpsul/kfet/decorators.py

10 lines
204 B
Python
Raw Permalink Normal View History

2016-09-01 00:45:44 +02:00
# -*- coding: utf-8 -*-
2017-03-20 04:11:50 +01:00
from django.contrib.auth.decorators import user_passes_test
2016-09-01 00:45:44 +02:00
def kfet_is_team(user):
return user.has_perm('kfet.is_team')
2017-03-21 00:24:44 +01:00
teamkfet_required = user_passes_test(kfet_is_team)