WPD: permit /views to non-patrons.

remotes/1693045480750635534/spooky-22
Snakes 2022-08-14 17:01:04 -04:00
parent c619204ec0
commit c881e284b0
Signed by: Snakes
GPG Key ID: E745A82778055C7E
1 changed files with 2 additions and 1 deletions

View File

@ -887,7 +887,8 @@ def following(username, v):
@app.get("/views")
@auth_required
def visitors(v):
if v.admin_level < 2 and not v.patron: return render_template("errors/patron.html", v=v)
if v.admin_level < 2 and (not v.patron and SITE_NAME != 'WPD'):
return render_template("errors/patron.html", v=v)
viewers=sorted(v.viewers, key = lambda x: x.last_view_utc, reverse=True)
return render_template("viewers.html", v=v, viewers=viewers)