discourse/lib/guardian
Roman Rizzi ba139b8c23
REFACTOR: Improve reusability by Decoupling flag modal from flag target. (#18251)
* REFACTOR: Improve reusability by Decoupling flag modal from flag target.

We want chat message's flags to have the same features as topic and posts' flags, but we prefer not having to duplicate core's logic. This PR moves target specific bits to different classes, allowing plugins to flag custom things by
providing their own.

* A couple of fixes for the flag modal:

- Make sure buttons are disabled until a flag type is selected.
- Don't throw an error when checking if the user can undo an action on a deleted topic.
- Disable flagging on deleted topics.
2022-09-29 11:57:36 -03:00
..
bookmark_guardian.rb FEATURE: Promote polymorphic bookmarks to default and migrate (#16729) 2022-05-23 10:07:15 +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: Introduce personal_message_enabled_groups setting (#18042) 2022-09-26 13:58:40 +10:00
post_guardian.rb REFACTOR: Improve reusability by Decoupling flag modal from flag target. (#18251) 2022-09-29 11:57:36 -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 FEATURE: Introduce personal_message_enabled_groups setting (#18042) 2022-09-26 13:58:40 +10:00
topic_guardian.rb FEATURE: Introduce personal_message_enabled_groups setting (#18042) 2022-09-26 13:58:40 +10:00
user_guardian.rb FEATURE: users with no posts shouldn't able to edit username after the allowed period. (#17583) 2022-07-21 04:46:15 +05:30