discourse/app
Alan Guo Xiang Tan 365eef3a64
DEV: Introduce TopicGuardian#can_see_topic_ids method (#18692) (#18765)
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.
2022-10-27 07:46:28 +08:00
..
assets DEV: Fix auto start for wizard qunit tests (#16988) 2022-06-03 12:44:42 +08:00
controllers SECURITY: moderator shouldn't be able to import a theme via API (stable) (#18420) 2022-09-29 20:13:34 +02:00
helpers DEV: Support for running theme test with Ember CLI (third attempt) 2022-01-13 16:02:07 -05:00
jobs SECURITY: Hide private categories in user activity export (#16276) 2022-03-24 15:56:50 +10:00
mailers
models DEV: Introduce TopicGuardian#can_see_topic_ids method (#18692) (#18765) 2022-10-27 07:46:28 +08:00
serializers SECURITY: Category group permissions leaked to normal users. 2022-04-08 11:04:59 +02:00
services FIX: Prevent "integer out of range" when merging post timings (#15723) 2022-01-26 23:34:28 +01:00
views DEV: Support for running theme test with Ember CLI (third attempt) 2022-01-13 16:02:07 -05:00