redirect user to index if user not an admin

This commit is contained in:
crunk 2022-03-23 22:45:32 +01:00
parent 80f08d4bf9
commit 98387210a1

View File

@ -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()