Exclude drafts from edit limit.

master
Snakes 2022-06-19 02:10:37 -04:00
parent e5193cbd46
commit eb8b85eb09
1 changed files with 1 additions and 1 deletions

View File

@ -441,7 +441,7 @@ def edit_post(pid, v):
p = get_post(pid)
if not v.admin_level >= 3:
if time.time() - p.created_utc > 7*24*60*60:
if time.time() - p.created_utc > 7*24*60*60 and not p.private:
return {"error":"You can't edit posts older than 1 week!"}, 403
elif p.author_id != v.id:
abort(403)