12 lines
288 B
Python
12 lines
288 B
Python
from django.contrib.auth.decorators import user_passes_test
|
|
|
|
|
|
def kfet_is_team(user):
|
|
if hasattr(user.profile, "account_kfet") and user.profile.account_kfet.is_frozen:
|
|
return False
|
|
|
|
return user.has_perm("kfet.is_team")
|
|
|
|
|
|
teamkfet_required = user_passes_test(kfet_is_team)
|