2012-07-11 17:39:20 +02:00
|
|
|
from django_cas.decorators import user_passes_test
|
|
|
|
|
|
|
|
def is_cof(user):
|
|
|
|
try:
|
|
|
|
profile = user.get_profile()
|
|
|
|
return profile.is_cof
|
|
|
|
except:
|
|
|
|
return False
|
|
|
|
|
2013-09-05 22:20:52 +02:00
|
|
|
cof_required = user_passes_test(lambda u: is_cof(u))
|
2012-07-11 17:39:20 +02:00
|
|
|
|
|
|
|
def is_buro(user):
|
|
|
|
try:
|
|
|
|
profile = user.get_profile()
|
|
|
|
return profile.is_buro
|
|
|
|
except:
|
|
|
|
return False
|
|
|
|
|
2013-09-05 22:20:52 +02:00
|
|
|
buro_required = user_passes_test(lambda u: is_buro(u))
|