mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 02:40:53 -06:00
a473e352de
Before this commit, there was no way for us to efficiently check an array of topics for which a user can see. Therefore, this commit introduces the `TopicGuardian#can_see_topic_ids` method which accepts an array of `Topic#id`s and filters out the ids which the user is not allowed to see. The `TopicGuardian#can_see_topic_ids` method is meant to maintain feature parity with `TopicGuardian#can_see_topic?` at all times so a consistency check has been added in our tests to ensure that `TopicGuardian#can_see_topic_ids` returns the same result as `TopicGuardian#can_see_topic?`. In the near future, the plan is for us to switch to `TopicGuardian#can_see_topic_ids` completely but I'm not doing that in this commit as we have to be careful with the performance impact of such a change. This method is currently not being used in the current commit but will be relied on in a subsequent commit. |
||
---|---|---|
.. | ||
versioning | ||
bookmarkable_helper.rb | ||
common_basic_reviewable_serializer.rb | ||
concurrency.rb | ||
diagnostics_helper.rb | ||
discourse_event_helper.rb | ||
fake_logger.rb | ||
fake_s3.rb | ||
fast_image_helpers.rb | ||
helpers.rb | ||
imap_helper.rb | ||
integration_helpers.rb | ||
match_html_matcher.rb | ||
negated_matcher.rb | ||
onebox_helpers.rb | ||
rate_limit_matcher.rb | ||
session_controller_helper_routes.rb | ||
shared_examples_for_stats_cacheable.rb | ||
sidekiq_helpers.rb | ||
site_settings_helpers.rb | ||
system_helpers.rb | ||
test_second_factor_action.rb | ||
time_matcher.rb | ||
topic_guardian_can_see_consistency_check.rb | ||
uploads_helpers.rb | ||
user_sidebar_tags_mixin.rb | ||
webauthn_integration_helpers.rb |