diff --git a/rowers/braintreestuff.py b/rowers/braintreestuff.py index 1dd572a0..4de44b42 100644 --- a/rowers/braintreestuff.py +++ b/rowers/braintreestuff.py @@ -154,6 +154,7 @@ def update_subscription(rower,data,method='up'): return False,0 if result.is_success: + yesterday = (timezone.now()-datetime.timedelta(days=1)).date() rower.paidplan = plan rower.planexpires = result.subscription.billing_period_end_date rower.teamplanexpires = result.subscription.billing_period_end_date @@ -161,6 +162,8 @@ def update_subscription(rower,data,method='up'): rower.paymenttype = plan.paymenttype rower.rowerplan = plan.shortname rower.subscription_id = result.subscription.id + rower.protrialexpires = yesterday + rower.plantrialexpires = yesterday rower.save() name = '{f} {l}'.format( f = rower.user.first_name, diff --git a/rowers/templates/menu_teams.html b/rowers/templates/menu_teams.html index 84551097..9be35ba0 100644 --- a/rowers/templates/menu_teams.html +++ b/rowers/templates/menu_teams.html @@ -8,13 +8,11 @@ Overview - {% if user|is_manager %}
- On rowsandall.com, users with the paid "Coach" plan can establish teams and invite other users to become part of the team. The purpose - of a team is to share workout and training plan data between the coach and the team members. In terms of sharing behavior, there are two types of teams: + On rowsandall.com, users with the paid "Coach" plan can establish teams or groups and invite other users to become part of the team or group. The purpose + of a team or group is to share workout and training plan data between the coach and the team or group members. In terms of sharing behavior, there are two types of teams or groups:
- By accepting an "invitation" to become a member of a team, or by requesting to become part of a team, you agree to automatically - share all your workout data (including workouts done prior to becoming a member of the team) to the team manager (coach) and, - depending to the team policy, to other members of the team. When you leave - a team, all your workout data will immediately become invisible to those who had access to it during your team membership, including - workouts that cover the period of time when you were member of the team. As a member of a team, you grant the team manager + By accepting an "invitation" to become a member of a team or group, or by requesting to become part of a team or group, you agree to automatically + share all your workout data (including workouts done prior to becoming a member of the team or group) to the team or group manager (coach) and, + depending to the team or group policy, to other members of the team or group. When you leave + a team or group, all your workout data will immediately become invisible to those who had access to it during your team or group membership, including + workouts that cover the period of time when you were member of the team or group. As a member of a team or group, you may grant the team or group manager permission to edit workout data - on your behalf, including the creation of charts and cross workout analysis. You also grant the team manager permission to + on your behalf, including the creation of charts and cross workout analysis. + This includes permission to edit your heart rate and power settings, as well as functional threshold information and the account information accessible on your - settings page under the header "Account Information". The team manager is not able to access or change your passwords, team memberships, - favorite charts, export settings, workflow layout, or secret tokens. Also, the team manager is not able to download all your data, + settings page under the header "Account Information". The team or group manager is not able to access or change your passwords, team or group memberships, + favorite charts, export settings, workflow layout, or secret tokens. Also, the team or group manager is not able to download all your data, nor can he deactivate or delete your account.
- Each team member is bound by this privacy policy and the GDPR regulation of the European Union regarding the personal data of other team - members that he has access to. By accepting an invitation to a team, the new member agrees to limit the use of these data strictly to the + Each team or group member is bound by this privacy policy and the GDPR regulation of the European Union regarding the personal data of other team or group + members that he has access to. By accepting an invitation to a team or group, the new member agrees to limit the use of these data strictly to the allowed use according to this privacy policy and the GDPR.
- Team managers can access requests of users to be added to one of their teams. By accepting the invitation, the manager accepts the responsibilities - and duties associated with access to personal data of the new team member. He is bound by this privacy policy and the GDPR regulation + Team Or Group managers can access requests of users to be added to one of their teams or groups. + He can request or receive permission to edit an athlete's data and run analysis on an + athlete's behalf as described above. + By requesting or receiving these permissions, the manager accepts the responsibilities + and duties associated with access to personal data of the new team or group member. + He is bound by this privacy policy and the GDPR regulation of the European Union regarding the personal data that he has access to.
- In case that a team manager wants to change the sharing behavior of one of his teams from "Coach Only" to "All Members", he has to inform all - impacted team members in due time. He shall give team members a minimum of three days to decide whether they agree with the new sharing policy, and - collect the consent of the team members with the new sharing policy. The team manager must remove team members who did not give their active consent - to the new policy from his team. If a team member has not responded within 7 days of being notified, the team manager will understand this as "no consent" - and remove the team member. + In case that a team or group manager wants to change the sharing behavior of one of his teams or groups from "Coach Only" to "All Members", he has to inform all + impacted team or group members in due time. He shall give team or group members a minimum of three days to decide whether they agree with the new sharing policy, and + collect the consent of the team or group members with the new sharing policy. The team or group manager must remove team or group members who did not give their active consent + to the new policy from his team or group. If a team or group member has not responded within 7 days of being notified, the team or group manager will understand this as "no consent" + and remove the team or group member.
- When notified of a change in team sharing behavior by the team manager, the team member has to decide whether he agrees. In case of disagreement, he shall - revoke his team membership within less than 7 days of being notified. + When notified of a change in team or group sharing behavior by the team or group manager, the team or group member has to decide whether he agrees. In case of disagreement, he shall + revoke his team or group membership within less than 7 days of being notified.
| Coach | +|
|---|---|
| + {{ coach.user.first_name }} {{ coach.user.last_name }} + | ++ Remove + + | +
| Name | +|
|---|---|
| + {{ coachee.user.first_name }} {{ coachee.user.last_name }} + | ++ Remove + + | +
This section lists open invites to join a team. By accepting - a team invite, you are agreeing with the sharing - of personal data between team members and coaches according to +
This section lists open invites to join a group. By accepting + a group invite, you are agreeing with the sharing + of personal data between group members and coaches according to our privacy policy.
-As a team manager, by accepting a team invite, you are agreeing - with our privacy policy regarding teams and - personal data owned by team members.
+As a group manager, by accepting a group invite, you are agreeing + with our privacy policy regarding groups and + personal data owned by group members.
| Team | +Group | Manager | User | Action | diff --git a/rowers/tests/test_permissions.py b/rowers/tests/test_permissions.py index 7b30f9e9..cda4b9e5 100644 --- a/rowers/tests/test_permissions.py +++ b/rowers/tests/test_permissions.py @@ -93,17 +93,17 @@ class PermissionsBasicsTests(TestCase): ## TeamPro, TeamCoach, TeamSelfCoach self.teampro = Team.objects.create( - name=faker.word(), + name=faker.word()+'1', notes=faker.text(), manager=self.upro2) self.teamplan = Team.objects.create( - name=faker.word(), + name=faker.word()+'2', notes=faker.text(), manager=self.uplan2) self.teamcoach = Team.objects.create( - name=faker.word(), + name=faker.word()+'3', notes=faker.text(), manager=self.ucoach) @@ -355,12 +355,12 @@ class PermissionsViewTests(TestCase): manager=self.upro2) self.teamplan = Team.objects.create( - name=faker.word(), + name=faker.word()+'2', notes=faker.text(), manager=self.uplan2) self.teamcoach = Team.objects.create( - name=faker.word(), + name=faker.word()+'3', notes=faker.text(), manager=self.ucoach) @@ -991,6 +991,11 @@ class PermissionsViewTests(TestCase): expected_url = expected_url, status_code=302,target_status_code=200) + +# coach related + +## coach disappears from list when downgrading + # Race related ## Basic and Pro users can create races diff --git a/rowers/tests/test_team.py b/rowers/tests/test_team.py index 9da7098e..c1043d5c 100644 --- a/rowers/tests/test_team.py +++ b/rowers/tests/test_team.py @@ -349,13 +349,4 @@ class TeamTestLowLevel(TestCase): id, comment = create_invite(self.t, self.users[3],self.users[4]) self.assertEqual(id,0) - # cannot exceed club size - for i in range(5): - id, comment = create_invite(self.t,self.u,user=self.users[i+1]) - - if i <= self.u.rower.clubsize: - self.assertEqual(comment,'Invitation created') - else: - self.assertEqual(id,0) - diff --git a/rowers/tests/testdata/testdata.csv.gz b/rowers/tests/testdata/testdata.csv.gz index 804bb97a..bf3c1415 100644 Binary files a/rowers/tests/testdata/testdata.csv.gz and b/rowers/tests/testdata/testdata.csv.gz differ diff --git a/templates/newbase.html b/templates/newbase.html index 74608dff..05596f32 100644 --- a/templates/newbase.html +++ b/templates/newbase.html @@ -216,7 +216,7 @@
|---|