Restrict permabanned editing content.

remotes/1693176582716663532/tmp_refs/heads/watchparty
Snakes 2022-11-13 19:00:55 -05:00
parent 188923a908
commit cc8f2d1a6e
Signed by: Snakes
GPG Key ID: E745A82778055C7E
2 changed files with 2 additions and 2 deletions

View File

@ -368,7 +368,7 @@ def comment(v):
@app.post("/edit_comment/<cid>")
@limiter.limit("1/second;10/minute;100/hour;200/day")
@limiter.limit("1/second;10/minute;100/hour;200/day", key_func=lambda:f'{SITE}-{session.get("lo_user")}')
@auth_required
@is_not_permabanned
def edit_comment(cid, v):
c = get_comment(cid, v=v)

View File

@ -307,7 +307,7 @@ def morecomments(v, cid):
@app.post("/edit_post/<pid>")
@limiter.limit("1/second;10/minute;100/hour;200/day")
@limiter.limit("1/second;10/minute;100/hour;200/day", key_func=lambda:f'{SITE}-{session.get("lo_user")}')
@auth_required
@is_not_permabanned
def edit_post(pid, v):
p = get_post(pid)
if v.id != p.author_id and v.admin_level < PERMS['POST_EDITING']: