From 4197c34cf4bb49f816af4c30d8791199ac10edf2 Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Wed, 24 Jan 2018 06:14:37 +0000 Subject: [PATCH] String admin id compare to see if they can access /admin point --- webapp/titanembeds/blueprints/admin/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/titanembeds/blueprints/admin/admin.py b/webapp/titanembeds/blueprints/admin/admin.py index 769d7a9..bba1a04 100644 --- a/webapp/titanembeds/blueprints/admin/admin.py +++ b/webapp/titanembeds/blueprints/admin/admin.py @@ -16,7 +16,7 @@ def is_admin(f): def decorated_function(*args, **kwargs): if 'user_id' not in session: return redirect(url_for("index")) - if session['user_id'] not in get_administrators_list(): + if str(session['user_id']) not in get_administrators_list(): return redirect(url_for("index")) return f(*args, **kwargs) return decorated_function