checking and fixing some rules based redirects
This commit is contained in:
@@ -82,6 +82,20 @@ def user_is_not_basic(user):
|
||||
|
||||
return False
|
||||
|
||||
@rules.predicate
|
||||
def can_start_trial(user):
|
||||
if user.is_anonymous:
|
||||
return False
|
||||
|
||||
return user.rower.protrialexpires > datetime.date(1970,1,1)
|
||||
|
||||
@rules.predicate
|
||||
def can_start_plantrial(user):
|
||||
if user.is_anonymous:
|
||||
return False
|
||||
|
||||
return user.rower.plantrialexpires > datetime.date(1970,1,1)
|
||||
|
||||
@rules.predicate
|
||||
def is_coach(user):
|
||||
return user.rower.rowerplan in ['coach','freecoach']
|
||||
|
||||
Reference in New Issue
Block a user