remotes/1693045480750635534/spooky-22
Aevann1 2021-07-30 16:41:01 +02:00
parent 28372256c8
commit 8323df14a6
1 changed files with 11 additions and 2 deletions

View File

@ -19,12 +19,21 @@ import matplotlib.pyplot as plt
from drama.__main__ import app, cache
from .front import frontlist
@app.get("/admin/patrons")
@auth_required
def shadowbanned(v):
if v and v.is_banned and not v.unban_utc: return render_template("seized.html")
if not (v and v.admin_level == 6): abort(404)
users = [x for x in g.db.query(User).filter_by(patron = True).all()]
return render_template("banned.html", v=v, users=users)
@app.get("/admin/shadowbanned")
@auth_required
def shadowbanned(v):
if v and v.is_banned and not v.unban_utc: return render_template("seized.html")
if not (v and v.admin_level == 6): abort(404)
users = [x for x in g.db.query(User).filter(User.shadowbanned == True).all()]
users = [x for x in g.db.query(User).filter_by(shadowbanned = True).all()]
return render_template("banned.html", v=v, users=users)
@ -33,7 +42,7 @@ def shadowbanned(v):
def agendaposters(v):
if v and v.is_banned and not v.unban_utc: return render_template("seized.html")
if not (v and v.admin_level == 6): abort(404)
users = [x for x in g.db.query(User).filter(User.agendaposter == True).all()]
users = [x for x in g.db.query(User).filter_by(agendaposter = True).all()]
return render_template("banned.html", v=v, users=users)