Alan Guo Xiang Tan
a473e352de
DEV: Introduce TopicGuardian#can_see_topic_ids method ( #18692 )
...
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 06:13:21 +08:00
..
2022-10-26 09:05:15 +08:00
2022-08-24 01:43:42 +02:00
2022-08-04 11:05:02 +02:00
2022-09-29 20:00:38 +02:00
2022-08-04 11:05:02 +02:00
2022-07-28 10:27:38 +08:00
2022-10-25 15:29:09 +08:00
2022-10-25 15:29:09 +08:00
2022-10-07 09:16:04 +11:00
2022-10-27 06:13:21 +08:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-08-04 11:05:02 +02:00
2022-07-28 10:27:38 +08:00
2022-09-27 14:26:06 +05:30
2022-07-28 10:27:38 +08:00
2022-10-24 22:26:48 +03:00
2022-08-04 11:05:02 +02:00
2022-10-11 09:04:51 +10:00
2022-03-01 17:50:50 +00:00
2022-07-28 10:27:38 +08:00
2022-08-04 11:05:02 +02:00
2022-10-07 16:02:03 -06:00
2022-09-29 09:24:33 +10:00
2022-10-13 02:43:56 +05:30
2022-08-04 11:05:02 +02:00
2022-09-29 20:00:38 +02:00
2022-10-05 10:50:20 +10:00
2022-10-25 15:29:09 +08:00
2022-07-28 10:27:38 +08:00
2022-10-06 12:02:48 +05:30
2022-07-28 10:27:38 +08:00
2022-09-26 13:58:40 +10:00
2022-08-04 11:05:02 +02:00
2022-08-30 09:21:41 +10:00
2022-06-30 10:18:12 +10:00
2022-05-23 10:07:15 +10:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-09-27 22:06:40 +05:30
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-09-29 09:24:33 +10:00
2022-08-04 11:05:02 +02:00
2022-07-28 10:27:38 +08:00
2022-03-01 17:50:50 +00:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-10-21 14:48:27 +01:00
2022-08-04 11:05:02 +02:00
2022-08-26 15:16:50 +10:00
2022-07-28 10:27:38 +08:00
2022-08-04 11:05:02 +02:00
2022-09-30 08:28:09 +00:00
2022-08-04 11:05:02 +02:00
2022-08-08 18:07:49 +02:00
2022-07-28 10:27:38 +08:00
2022-08-04 11:05:02 +02:00
2022-07-28 10:27:38 +08:00
2022-09-30 00:49:17 +03:00
2022-08-30 20:33:08 +01:00
2022-08-04 11:05:02 +02:00
2022-08-04 11:05:02 +02:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-08-09 16:54:45 +02:00
2022-03-01 17:50:50 +00:00
2022-08-04 11:05:02 +02:00
2022-08-04 11:05:02 +02:00
2022-07-28 10:27:38 +08:00
2022-10-27 06:13:21 +08:00
2022-08-04 11:05:02 +02:00
2022-08-04 11:05:02 +02:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-08-04 11:05:02 +02:00
2022-08-04 11:05:02 +02:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-09-26 09:14:24 +10:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-10-05 10:50:20 +10:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-08-20 11:19:19 +02:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-08-04 11:05:02 +02:00
2022-09-26 13:58:40 +10:00
2022-08-04 11:05:02 +02:00
2022-10-05 10:50:20 +10:00
2022-09-22 14:44:27 +02:00
2022-03-01 17:50:50 +00:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-10-19 18:54:32 +03:00
2022-07-28 10:27:38 +08:00
2022-10-12 14:07:37 +03:00
2022-08-04 11:05:02 +02:00
2022-07-28 10:27:38 +08:00
2022-08-04 11:05:02 +02:00
2022-08-23 15:03:57 +10:00
2022-08-04 11:05:02 +02:00
2022-03-01 17:50:50 +00:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-08-04 11:05:02 +02:00
2022-08-04 11:05:02 +02:00
2022-07-28 10:27:38 +08:00
2022-10-05 10:50:20 +10:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-10-25 15:29:09 +08:00
2022-08-04 11:05:02 +02:00
2022-07-28 10:27:38 +08:00
2022-08-04 11:05:02 +02:00
2022-07-28 10:27:38 +08:00
2022-08-04 11:05:02 +02:00
2022-08-04 11:05:02 +02:00
2022-07-28 10:27:38 +08:00
2022-10-21 19:05:34 +01:00
2022-08-04 11:05:02 +02:00
2022-08-04 11:05:02 +02:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-10-05 10:50:20 +10:00
2022-08-04 11:05:02 +02:00
2022-10-05 10:50:20 +10:00
2022-07-28 10:27:38 +08:00
2022-09-29 09:24:33 +10:00
2022-10-25 06:18:40 +08:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-08-04 11:05:02 +02:00
2022-07-28 10:27:38 +08:00
2022-10-25 15:29:09 +08:00
2022-09-29 09:24:33 +10:00
2022-07-28 10:27:38 +08:00
2022-09-29 09:24:33 +10:00
2022-09-29 09:24:33 +10:00
2022-09-29 09:24:33 +10:00
2022-08-04 10:16:54 +10:00
2022-07-28 10:27:38 +08:00
2022-07-28 10:27:38 +08:00
2022-08-04 11:05:02 +02:00