def ensure_post
      post_id = params[:post_id] || params[:id]
      board_id = params[:board_id]
      result = has_post_access(board_id, post_id)
      status = result[:status]
      @post = result[:post]
      head status if status != :ok
    end
def ensure_post
      post_id = params[:post_id] || params[:id]
      board_id = params[:board_id]
      result = has_post_access(board_id, post_id)
      status = result[:status]
      @post = result[:post]
      head status if status != :ok
    end
Ensures user is owner of the post and sets the `@post` variable in the controllers