Private
Public Access
1
0

Merge branch 'release/v12.10'

This commit is contained in:
Sander Roosendaal
2020-04-10 14:14:23 +02:00
3 changed files with 12 additions and 8 deletions

View File

@@ -83,6 +83,10 @@ def user_is_not_basic(user):
return False return False
@rules.predicate
def user_is_basic(user):
return not user_is_not_basic(user)
@rules.predicate @rules.predicate
def can_start_trial(user): def can_start_trial(user):
if user.is_anonymous: if user.is_anonymous:

View File

@@ -27,7 +27,7 @@ from rowers.models import (
CoachingGroup CoachingGroup
) )
from rowers.rower_rules import is_team_manager,is_team_member,is_coach from rowers.rower_rules import is_team_manager,is_team_member,is_coach, user_is_basic
from rowers.tasks import ( from rowers.tasks import (
handle_sendemail_invite, handle_sendemail_invite,
@@ -79,9 +79,8 @@ def update_team(t,name,manager,private,notes,viewing):
def create_team(name,manager,private='open',notes='',viewing='allmembers'): def create_team(name,manager,private='open',notes='',viewing='allmembers'):
# needs some error testing # needs some error testing
if manager.rower.rowerplan == 'basic': if user_is_basic(manager.rower.user):
if manager.rower.protrialexpires < timezone.now().date() and manager.rower.plantrialexpires < timezone.now().date(): return (0,'You need to upgrade to a paid plan to establish a team')
return (0,'You need to upgrade to a paid plan to establish a team')
if not is_coach(manager): if not is_coach(manager):
ts = Team.objects.filter(manager=manager) ts = Team.objects.filter(manager=manager)
if len(ts)>=1: if len(ts)>=1:

View File

@@ -20,7 +20,8 @@
community. To maintain maximum transparency to our users, we have community. To maintain maximum transparency to our users, we have
the following principles for collaboration:</p> the following principles for collaboration:</p>
<p>On blog.rowsandall.com, analytics.rowsandall.com and through <p>On <a href="https://blog.rowsandall.com/">blog.rowsandall.com</a>,
<a href="https://analytics.rowsandall.com/">analytics.rowsandall.com</a> and through
our Twitter account, we write about hardware, software, and other our Twitter account, we write about hardware, software, and other
rowing related kit that we have used, tested, and are enthusiastic about. </p> rowing related kit that we have used, tested, and are enthusiastic about. </p>
@@ -32,9 +33,9 @@
<li>We do not formally publish product reviews, however, we may or <li>We do not formally publish product reviews, however, we may or
may not may not
mention your product mention your product
on <a href="blog.rowsandall.com">blog.rowsandall.com</a> on <a href="https://blog.rowsandall.com">blog.rowsandall.com</a>
or or
<a href="analytics.rowsandall.com">analytics.rowsandall.com</a>.</li> <a href="https://analytics.rowsandall.com">analytics.rowsandall.com</a>.</li>
<li>If there are reasons why we are not satisfied with the unit, but <li>If there are reasons why we are not satisfied with the unit, but
we feel that an improved version would serve the rowing community, we feel that an improved version would serve the rowing community,
we may contact you with constructive criticism. We try to not mention we may contact you with constructive criticism. We try to not mention