discourse/lib/guardian
Martin Brennan 222c8d9b6a
FEATURE: Polymorphic bookmarks pt. 3 (reminders, imports, exports, refactors) (#16591)
A bit of a mixed bag, this addresses several edge areas of bookmarks and makes them compatible with polymorphic bookmarks (hidden behind the `use_polymorphic_bookmarks` site setting). The main ones are:

* ExportUserArchive compatibility
* SyncTopicUserBookmarked job compatibility
* Sending different notifications for the bookmark reminders based on the bookmarkable type
* Import scripts compatibility
* BookmarkReminderNotificationHandler compatibility

This PR also refactors the `register_bookmarkable` API so it accepts a class descended from a `BaseBookmarkable` class instead. This was done because we kept having to add more and more lambdas/properties inline and it was very messy, so a factory pattern is cleaner. The classes can be tested independently as well.

Some later PRs will address some other areas like the discourse narrative bot, advanced search, reports, and the .ics endpoint for bookmarks.
2022-05-09 09:37:23 +10:00
..
bookmark_guardian.rb FEATURE: Polymorphic bookmarks pt. 3 (reminders, imports, exports, refactors) (#16591) 2022-05-09 09:37:23 +10:00
category_guardian.rb FEATURE: Allow admins to permanently delete posts and topics (#14406) 2021-10-13 12:53:23 +03:00
ensure_magic.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
group_guardian.rb FEATURE: Experimental support for group membership via google auth (#14835) 2021-12-09 12:30:27 +00:00
post_guardian.rb FIX: Respect the cooldown window when editing a flagged topic. (#16046) 2022-02-25 11:09:31 -03:00
post_revision_guardian.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
tag_guardian.rb DEV: Reuse code for TrustLevelAndStaffSetting (#15044) 2021-11-22 20:18:53 +02:00
topic_guardian.rb FIX: Respect the cooldown window when editing a flagged topic. (#16046) 2022-02-25 11:09:31 -03:00
user_guardian.rb FIX: Add DB constraints for post & topic counter cache for UserStat (#15626) 2022-02-07 11:23:34 +08:00