This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app
Alan Guo Xiang Tan ebc498945b
DEV: Introduce TopicGuardian#can_see_topic_ids method (#18692) (#18766)
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:38 +08:00
..
assets FIX: Workaround a bug in the R2 gem to produce valid RTL CSS (#18446) 2022-10-02 23:03:22 +03:00
controllers SECURITY: moderator shouldn't be able to import a theme via API (#18418) 2022-09-29 20:00:20 +02:00
helpers DEV: Rename secure_media to secure_uploads (#18376) 2022-09-29 09:24:33 +10:00
jobs DEV: Rename secure_media to secure_uploads (#18376) 2022-09-29 09:24:33 +10:00
mailers FEATURE: Custom unsubscribe options (#17090) 2022-06-21 15:49:47 -03:00
models DEV: Introduce TopicGuardian#can_see_topic_ids method (#18692) (#18766) 2022-10-27 07:46:38 +08:00
serializers DEV: Rename secure_media to secure_uploads (#18376) 2022-09-29 09:24:33 +10:00
services DEV: Use AR enums in reviewables related code 2022-09-22 14:44:27 +02:00
views DEV: Remove support for legacy plugin JS compilation pipeline (#18293) 2022-09-21 12:38:02 +01:00