kpsul/kfet/decorators.py
Aurélien Delobelle ba0a5d0d27 Py2 compatible
2016-09-01 00:45:44 +02:00

12 lines
343 B
Python

# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division,
print_function, unicode_literals)
from builtins import *
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))