summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--apioforum/forum.py1
-rw-r--r--apioforum/roles.py4
2 files changed, 5 insertions, 0 deletions
diff --git a/apioforum/forum.py b/apioforum/forum.py
index d177b16..bbc43fe 100644
--- a/apioforum/forum.py
+++ b/apioforum/forum.py
@@ -1,5 +1,6 @@
# view threads in a forum
# currently there is only ever one forum however
+# ^ aha we never removed this. we should keep it. it is funny.
from flask import (
Blueprint, render_template, request,
diff --git a/apioforum/roles.py b/apioforum/roles.py
index 1e9b206..bd913a0 100644
--- a/apioforum/roles.py
+++ b/apioforum/roles.py
@@ -37,6 +37,10 @@ def get_role_config(forum_id, role):
def get_user_role(forum_id, user):
db = get_db()
+ user = db.execute('SELECT * FROM users WHERE username = ?',
+ (user,)).fetchone()
+ if user == None: return "other"
+ if user['admin']: return "bureaucrat"
fid = forum_id
the = None