From 2fd6a371fc19b72dd5ac016e50c1b5a186b0ce95 Mon Sep 17 00:00:00 2001 From: Troplo Date: Mon, 23 Nov 2020 01:28:50 +1100 Subject: [PATCH] Team admin role check when using Team Admin APIs (with terrible implementation because of my original terrible implementation of roles, you won't believe how many lines it is just to check whether a user has a role with admin, 56 lines!) --- frontend/src/components/routes/TeamInvite.vue | 15 +- lib/errors.js | 4 + routes/team.js | 32 +- routes/team_admin.js | 461 +++++++++++++++++- 4 files changed, 473 insertions(+), 39 deletions(-) diff --git a/frontend/src/components/routes/TeamInvite.vue b/frontend/src/components/routes/TeamInvite.vue index 4075355..d2f0332 100644 --- a/frontend/src/components/routes/TeamInvite.vue +++ b/frontend/src/components/routes/TeamInvite.vue @@ -1,6 +1,6 @@