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/spec
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
..
fabricators UX: Use dominant color as image loading placeholder (#18248) 2022-09-20 10:28:17 +01:00
fixtures FEATURE: Add support for case-sensitive Watched Words (#17445) 2022-08-02 10:06:03 +02:00
helpers DEV: output sitelinks search tag on homepage only (#16157) 2022-09-23 15:05:53 +08:00
import_export DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
initializers Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
integration DEV: Use AR enums in reviewables related code 2022-09-22 14:44:27 +02:00
integrity DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
jobs DEV: Rename secure_media to secure_uploads (#18376) 2022-09-29 09:24:33 +10:00
lib DEV: Introduce TopicGuardian#can_see_topic_ids method (#18692) (#18766) 2022-10-27 07:46:38 +08:00
mailers DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
models DEV: Rename secure_media to secure_uploads (#18376) 2022-09-29 09:24:33 +10:00
multisite DEV: Rename secure_media to secure_uploads (#18376) 2022-09-29 09:24:33 +10:00
requests SECURITY: moderator shouldn't be able to import a theme via API (#18418) 2022-09-29 20:00:20 +02:00
script/import_scripts DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
serializers DEV: Remove harded id when fabricating in tests (#18729) (#18731) 2022-10-25 06:31:05 +08:00
services FEATURE: Introduce personal_message_enabled_groups setting (#18042) 2022-09-26 13:58:40 +10:00
support DEV: Introduce TopicGuardian#can_see_topic_ids method (#18692) (#18766) 2022-10-27 07:46:38 +08:00
system DEV: Minimal first pass of rails system test setup (#16311) 2022-09-28 11:48:16 +10:00
tasks DEV: Rename secure_media to secure_uploads (#18376) 2022-09-29 09:24:33 +10:00
views Add RSpec 4 compatibility (#17652) 2022-07-28 10:27:38 +08:00
rails_helper.rb DEV: Minimal first pass of rails system test setup (#16311) 2022-09-28 11:48:16 +10:00
regenerate_swagger_docs DEV: Add API docs for uploads and API doc watcher (#15387) 2021-12-23 08:40:15 +10:00
swagger_helper.rb DEV: Fix openapi definition logo URL (#17038) 2022-06-08 13:10:20 +01:00