redirect user to index if user not an admin
This commit is contained in:
parent
80f08d4bf9
commit
98387210a1
@ -113,6 +113,8 @@ def distribusistash(path):
|
|||||||
@APP.route("/admin", methods=["GET", "POST"])
|
@APP.route("/admin", methods=["GET", "POST"])
|
||||||
@login_required
|
@login_required
|
||||||
def admin():
|
def admin():
|
||||||
|
if not isadminuser():
|
||||||
|
return redirect(url_for("index"))
|
||||||
return AdminPage()
|
return AdminPage()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user