Let users delete their own posts, fixes #208
This commit is contained in:
parent
8984074809
commit
d8661f62c7
1 changed files with 1 additions and 1 deletions
|
|
@ -716,7 +716,7 @@ proc executeDeletePost(c: TForumData, postId: int) =
|
|||
"""
|
||||
let id = getValue(db, postQuery, c.username, postId)
|
||||
|
||||
if id.len == 0 and c.rank < Admin:
|
||||
if id.len == 0 and (c.rank == Admin or c.userid == postRow[0]):
|
||||
raise newForumError("You cannot delete this post")
|
||||
|
||||
# Set the `isDeleted` flag.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue