mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-25 06:27:03 +01:00
String admin id compare to see if they can access /admin point
This commit is contained in:
parent
078ddaae6a
commit
4197c34cf4
@ -16,7 +16,7 @@ def is_admin(f):
|
|||||||
def decorated_function(*args, **kwargs):
|
def decorated_function(*args, **kwargs):
|
||||||
if 'user_id' not in session:
|
if 'user_id' not in session:
|
||||||
return redirect(url_for("index"))
|
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 redirect(url_for("index"))
|
||||||
return f(*args, **kwargs)
|
return f(*args, **kwargs)
|
||||||
return decorated_function
|
return decorated_function
|
||||||
|
Loading…
Reference in New Issue
Block a user