aboutsummaryrefslogtreecommitdiffstats
path: root/pysite
diff options
context:
space:
mode:
authorGravatar momothereal <[email protected]>2018-06-20 20:05:03 -0400
committerGravatar momothereal <[email protected]>2018-06-20 20:05:03 -0400
commit66e4c24493f7b66f5fda159797ad1fecbfde799a (patch)
treed7b68f201ad01d15e6b99934a4e86f7f065c355b /pysite
parentFix view name (diff)
Basic team information in team page + failed attempt at scss
Diffstat (limited to 'pysite')
-rw-r--r--pysite/views/main/jams/team_view.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pysite/views/main/jams/team_view.py b/pysite/views/main/jams/team_view.py
index 7eabfdba..2d99828c 100644
--- a/pysite/views/main/jams/team_view.py
+++ b/pysite/views/main/jams/team_view.py
@@ -41,7 +41,11 @@ class JamsTeamView(RouteView, DBMixin, OAuthMixin):
log.exception("Failed RethinkDB query")
raise NotFound()
+ # check if the current user is a member of this team
+ # (this is for edition privileges)
+ is_own_team = self.logged_in and self.user_data["user_id"] in [member["user_id"] for member in team["members"]]
+
return self.render(
"main/jams/team_view.html",
- team=team
+ team=team, is_own_team=is_own_team
)