1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed Member ability to delete posts should check thread open vs closed

Discussion in 'Resolved Bug Reports' started by TJ Adams, Aug 10, 2014.

  1. TJ Adams

    TJ Adams Member

    The ability for members to edit posts is disabled once a thread is closed.

    However, members can delete posts in those same closed threads.

    Code-wise, ./library/XenForo/Model/Post.php has a check for thread closure in function canEditPost(), right after checking that it is not a guest viewing. check uses: if (!$thread['discussion_open'])...

    I think that same if-block check should be placed in function canDeletePost(), in same relative position there.

    Logic: Why prevent members from editing posts, but, not prevent them from deleting posts in closed threads? How is deletion less of an issue than editing, once a thread is closed?

    Please consider.
     
    Bionic Rooster likes this.
  2. Mike

    Mike XenForo Developer Staff Member

    I can't really think of a reasonable use case where editing would be disabled but deleting not -- you can still report and have a moderator deal with it, of course. When a thread is locked, the content itself should generally be locked.

    As such, I'm changing this as part of 1.4. Good catch. :)
     
    Alluidh likes this.

Share This Page