docs: def can_edit_post(self, post, user):
          """ Given a forum post, checks whether the user can edit the latter. """
          checker = self._get_checker(user)
  
          # A user can edit a post if...
          #     they are a superuser
          #     they are the original poster of the forum post
          #     they belong to the forum moderators
          is_author = self._is_post_author(post, user)
          can_edit = (
              user.is_superuser or
              (
                  is_author and checker.has_perm('can_edit_own_posts', post.topic.forum) and
                  not post.topic.is_locked
              ) or
              checker.has_perm('can_edit_posts', post.topic.forum)
          )
          return can_edit