Skip to content

Commit

Permalink
Add deprecation warning to admin panel
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaylorhq committed Dec 3, 2024
1 parent 349b2a3 commit b37505b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/locales/server.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ en:
enabled_already: "You have already enabled encrypted messages."
only_pms: "Only private messages can be encrypted."
no_encrypt_keys: "Something went wrong. No encryption keys were included in the payload."
deprecated: The discourse-encrypt plugin is deprecated, and support will be dropped in Q1 2025. For more information, see <a href="https://meta.discourse.org/t/107918">Discourse Meta</a>. Uninstall the plugin to remove this message.

site_settings:
encrypt_enabled: "Enable encrypted private messages."
Expand Down
14 changes: 14 additions & 0 deletions plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,20 @@ class DiscourseEncrypt::Engine < Rails::Engine

register_problem_check ProblemCheck::UnsafeCsp

class DiscourseEncrypt::DeprecatedCheck < ProblemCheck
self.priority = "high"

def call
problem
end

def translation_key
"encrypt.deprecated"
end
end

register_problem_check DiscourseEncrypt::DeprecatedCheck

register_search_topic_eager_load do |opts|
if SiteSetting.encrypt_enabled? && opts[:search_pms]
%i[encrypted_topics_users encrypted_topics_data]
Expand Down

0 comments on commit b37505b

Please sign in to comment.