forked from MarseyWorld/MarseyWorld
Exclude drafts from edit limit.
parent
e5193cbd46
commit
eb8b85eb09
|
@ -441,7 +441,7 @@ def edit_post(pid, v):
|
||||||
p = get_post(pid)
|
p = get_post(pid)
|
||||||
|
|
||||||
if not v.admin_level >= 3:
|
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
|
return {"error":"You can't edit posts older than 1 week!"}, 403
|
||||||
elif p.author_id != v.id:
|
elif p.author_id != v.id:
|
||||||
abort(403)
|
abort(403)
|
||||||
|
|
Loading…
Reference in New Issue