rules rules rules
This commit is contained in:
@@ -243,7 +243,7 @@ def can_add_workout_member(user,rower):
|
||||
if user == rower.user:
|
||||
return True
|
||||
# only below tested - need test user == rower.user
|
||||
return isplanmember(user) and user.rower in rower.get_coaches()
|
||||
return is_coach(user) and user.rower in rower.get_coaches()
|
||||
|
||||
# check if user can plan for the rower
|
||||
@rules.predicate
|
||||
@@ -324,7 +324,6 @@ def is_workout_user(user,workout):
|
||||
def can_view_workout(user,workout):
|
||||
if workout.privacy != 'private':
|
||||
return True
|
||||
# below not tested
|
||||
return user.rower == workout.user
|
||||
|
||||
can_change_workout = is_workout_user
|
||||
|
||||
Reference in New Issue
Block a user