forked from rDrama/rDrama
fdfdfd
parent
28372256c8
commit
8323df14a6
|
@ -19,12 +19,21 @@ import matplotlib.pyplot as plt
|
||||||
from drama.__main__ import app, cache
|
from drama.__main__ import app, cache
|
||||||
from .front import frontlist
|
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")
|
@app.get("/admin/shadowbanned")
|
||||||
@auth_required
|
@auth_required
|
||||||
def shadowbanned(v):
|
def shadowbanned(v):
|
||||||
if v and v.is_banned and not v.unban_utc: return render_template("seized.html")
|
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)
|
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)
|
return render_template("banned.html", v=v, users=users)
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,7 +42,7 @@ def shadowbanned(v):
|
||||||
def agendaposters(v):
|
def agendaposters(v):
|
||||||
if v and v.is_banned and not v.unban_utc: return render_template("seized.html")
|
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)
|
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)
|
return render_template("banned.html", v=v, users=users)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue