Private
Public Access
1
0

first batch of tests

This commit is contained in:
2024-12-03 20:39:59 +01:00
parent a69384fdd3
commit 66365b7b84
4 changed files with 228 additions and 13 deletions

View File

@@ -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