Merge branch 'release/v13.26'
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,6 +2,7 @@
|
|||||||
/django_cache/
|
/django_cache/
|
||||||
testcert.crt
|
testcert.crt
|
||||||
testcert.key
|
testcert.key
|
||||||
|
garminlog.log
|
||||||
|
|
||||||
# Compiled python modules.
|
# Compiled python modules.
|
||||||
*.pyc
|
*.pyc
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -552,9 +552,10 @@ def can_view_session(user,session):
|
|||||||
# below untested
|
# below untested
|
||||||
if is_coach(user):
|
if is_coach(user):
|
||||||
teams = user.rower.get_managed_teams()
|
teams = user.rower.get_managed_teams()
|
||||||
teamusers = [member.u for member in t.rower.all()]
|
for t in teams:
|
||||||
if session.manager in teamusers:
|
teamusers = [member.u for member in t.rower.all()]
|
||||||
return True
|
if session.manager in teamusers:
|
||||||
|
return True
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
@@ -1014,6 +1014,13 @@ def garmin_summaries_view(request):
|
|||||||
if request.method != 'POST':
|
if request.method != 'POST':
|
||||||
return HttpResponse(status=200)
|
return HttpResponse(status=200)
|
||||||
|
|
||||||
|
t = time.localtime()
|
||||||
|
timestamp = time.strftime('%b-%d-%Y_%H%M', t)
|
||||||
|
with open('garminlog.log','a') as f:
|
||||||
|
f.write('\n')
|
||||||
|
f.write(timestamp)
|
||||||
|
f.write(' ')
|
||||||
|
f.write(str(request.body))
|
||||||
# POST request
|
# POST request
|
||||||
data = json.loads(request.body)
|
data = json.loads(request.body)
|
||||||
activities = data['activities']
|
activities = data['activities']
|
||||||
@@ -1029,6 +1036,14 @@ def garmin_deregistration_view(request):
|
|||||||
if request.method != 'POST':
|
if request.method != 'POST':
|
||||||
return HttpResponse(status=200)
|
return HttpResponse(status=200)
|
||||||
|
|
||||||
|
t = time.localtime()
|
||||||
|
timestamp = time.strftime('%b-%d-%Y_%H%M', t)
|
||||||
|
with open('garminlog.log','a') as f:
|
||||||
|
f.write('\n')
|
||||||
|
f.write(timestamp)
|
||||||
|
f.write(' ')
|
||||||
|
f.write(str(request.body))
|
||||||
|
|
||||||
data = json.loads(request.body)
|
data = json.loads(request.body)
|
||||||
try:
|
try:
|
||||||
garmintoken = data['userAccessToken']
|
garmintoken = data['userAccessToken']
|
||||||
|
|||||||
Reference in New Issue
Block a user