first batch of tests
This commit is contained in:
@@ -479,7 +479,9 @@ def is_workout_team(user, workout):
|
||||
|
||||
@rules.predicate
|
||||
def can_view_workout(user, workout):
|
||||
if workout.privacy != 'private':
|
||||
if workout.workoutsource == 'strava':
|
||||
return user == workout.user.user
|
||||
if workout.privacy not in ('hidden', 'private'):
|
||||
return True
|
||||
if user.is_anonymous: # pragma: no cover
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user