forked from rDrama/rDrama
Verification: allow admins to verify users
parent
362600c2a1
commit
9b80392c91
|
@ -660,6 +660,24 @@ def unshadowban(user_id, v):
|
||||||
|
|
||||||
return "", 204
|
return "", 204
|
||||||
|
|
||||||
|
@app.post("/admin/verify/<user_id>")
|
||||||
|
@admin_level_required(6)
|
||||||
|
@validate_formkey
|
||||||
|
def verify(user_id, v):
|
||||||
|
user = g.db.query(User).filter_by(id=user_id).first()
|
||||||
|
user.verified = True
|
||||||
|
g.db.add(user)
|
||||||
|
return "", 204
|
||||||
|
|
||||||
|
@app.post("/admin/unverify/<user_id>")
|
||||||
|
@admin_level_required(6)
|
||||||
|
@validate_formkey
|
||||||
|
def verify(user_id, v):
|
||||||
|
user = g.db.query(User).filter_by(id=user_id).first()
|
||||||
|
user.verified = False
|
||||||
|
g.db.add(user)
|
||||||
|
return "", 204
|
||||||
|
|
||||||
|
|
||||||
@app.post("/admin/title_change/<user_id>")
|
@app.post("/admin/title_change/<user_id>")
|
||||||
@admin_level_required(6)
|
@admin_level_required(6)
|
||||||
|
|
|
@ -308,6 +308,14 @@
|
||||||
<a class="btn btn-danger" href="javascript:void(0)" onclick="post_toast('/shadowban/{{u.id}}')">Shadowban</a>
|
<a class="btn btn-danger" href="javascript:void(0)" onclick="post_toast('/shadowban/{{u.id}}')">Shadowban</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<pre></pre>
|
||||||
|
|
||||||
|
{% if u.verified %}
|
||||||
|
<a class="btn btn-danger" href="javasript:void(0)" onclick="post_toast('/admin/unverify/{{u.id}}')">Unverify</a>
|
||||||
|
{% else %}
|
||||||
|
<a class="btn btn-success" href="javasript:void(0)" onclick="post_toast('/admin/verify/{{u.id}}')">Verify</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
<form action="/admin/unnuke_user" method="post">
|
<form action="/admin/unnuke_user" method="post">
|
||||||
<input type="hidden" name="formkey", value="{{v.formkey}}">
|
<input type="hidden" name="formkey", value="{{v.formkey}}">
|
||||||
|
|
Loading…
Reference in New Issue