From 6142d0e75d7ec5562004924736a449955cdd3776 Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Thu, 3 Mar 2016 18:44:58 -0600 Subject: [PATCH] Non-owners can't edit team information. --- server/api/models.py | 3 ++- web/pages/team.html | 14 ++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/server/api/models.py b/server/api/models.py index 686e795..e429e5a 100644 --- a/server/api/models.py +++ b/server/api/models.py @@ -36,7 +36,8 @@ class Users(db.Model): for inv in invitations: team = db.session.query(Teams).filter_by(tid=inv.frid).first() result.append({ - "team": team.teamname + "team": team.teamname, + "tid": team.tid }) return result diff --git a/web/pages/team.html b/web/pages/team.html index d20f656..0355284 100644 --- a/web/pages/team.html +++ b/web/pages/team.html @@ -20,8 +20,14 @@
-

{{ team['teamname'] }}

-

{{ team['school'] || 'Add School' }}

+
+

{{ team['teamname'] }}

+

{{ team['school'] || 'Add School' }}

+
+
+

{{ team['teamname'] }}

+

{{ team['school'] || 'Unknown Affiliation' }}

+
@@ -187,8 +193,8 @@

You need an invitation to join another team. If you'd like to request to be a member of their team, go to their team page and click the Request button.