Add sidebar builder
This commit is contained in:
@@ -67,7 +67,7 @@ def verify_user(username: str, password: str):
|
||||
def get_role_for_user(username: str) -> str:
|
||||
with closing(get_conn()) as conn:
|
||||
row = conn.execute(
|
||||
"SELECT role_id FROM users WHERE username = ?",
|
||||
"SELECT r.role_text from users u left join roles r on u.role_id = r.role_id WHERE username = ?",
|
||||
(username,),
|
||||
).fetchone()
|
||||
return row[0] if row else "user"
|
||||
|
||||
Reference in New Issue
Block a user