moved user and workout permission checks to rules
updated workoutviews, rest of views not done doesn't pass tests
This commit is contained in:
@@ -42,6 +42,8 @@ oauth_data = {
|
||||
'scope':'write',
|
||||
}
|
||||
|
||||
from rowers.rower_rules import is_workout_user
|
||||
|
||||
|
||||
# Checks if user has UnderArmour token, renews them if they are expired
|
||||
def tp_open(user):
|
||||
@@ -171,7 +173,7 @@ def workout_tp_upload(user,w):
|
||||
# need some code if token doesn't refresh
|
||||
|
||||
|
||||
if (checkworkoutuser(user,w)):
|
||||
if (is_workout_user(user,w)):
|
||||
tcxfile = createtpworkoutdata(w)
|
||||
if tcxfile:
|
||||
res,reason,status_code,headers = uploadactivity(
|
||||
|
||||
Reference in New Issue
Block a user