Private
Public Access
1
0
This commit is contained in:
Sander Roosendaal
2020-02-24 15:36:01 +01:00
parent 39f813e816
commit 6784b68bf7

View File

@@ -373,7 +373,9 @@ def is_workout_team(user,workout):
def can_view_workout(user,workout):
if workout.privacy != 'private':
return True
return user.rower == workout.user
if user.is_anonymous:
return False
return user == workout.user.user
can_change_workout = is_workout_user