From 09ab2230a58620c78ba0804f2655e3451f6429c9 Mon Sep 17 00:00:00 2001 From: Aaron Lee Date: Wed, 15 Sep 2021 22:46:46 +0800 Subject: [PATCH] Check permission --- app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 98e5bba..dc9db06 100644 --- a/app.py +++ b/app.py @@ -42,7 +42,8 @@ def check_login_status(): def check_permission(): - return db.child('Users').child(session['uid']).child('permission').get().val() == 'admin' + return (db.child('Users').child(session['uid']).child('permission').get().val() == 'admin' and + db.child("Users").child(session['uid']).child("showUpload").get().val() == '1') def manageProcess(fCommand, fData):