mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-05 05:25:19 +08:00
The `/raw/:topic_id` endpoint was exposing hidden posts to users who shouldn't see them, while `/raw/:topic_id/:post_number` correctly filtered them via `guardian.can_see?`. This inconsistency meant anonymous users and regular users could see hidden post content when fetching a whole topic as markdown. Also refactors `markdown_num` into smaller private methods for clarity.
4 lines
149 B
Ruby
4 lines
149 B
Ruby
# frozen_string_literal: true
|
|
|
|
RSpec::Matchers.define_negated_matcher :not_change, :change
|
|
RSpec::Matchers.define_negated_matcher :exclude, :include
|