Private
Public Access
1
0

fixing bug creating teams for trial users

This commit is contained in:
Sander Roosendaal
2020-04-06 09:46:59 +02:00
parent 47effe503e
commit 1b8185b2c7
6 changed files with 20 additions and 18 deletions

View File

@@ -142,6 +142,7 @@ def is_protrial(user):
return False
ispromember = is_promember | is_protrial
can_have_teams = ispromember | is_coach
@@ -151,7 +152,7 @@ def can_add_team(user):
if is_coach(user):
return True
if ispromember(user):
if ispromember(user) or is_planmember(user):
otherteams = user.rower.get_managed_teams()
if otherteams.count() == 0:
return True
@@ -628,7 +629,7 @@ def is_team_member(user,team):
def can_view_team(user,team):
# user based - below untested
if user.rower.rowerplan == 'basic' and team.manager.rower.rowerplan != 'coach':
return False
return is_plantrial(user) or is_protrial(user)
# team is public
if team.private == 'open':
return True