FIX: Hide core plugins from the admin Plugins list (#23328)

Most of the core plugins were already hidden, this hides
chat, styleguide, and checklist to avoid potential confusion
for end users.

Also removes respond_to? :hide_plugin, since that API has been
in place for a while now.
This commit is contained in:
Martin Brennan 2023-08-31 10:01:01 +10:00 committed by GitHub
parent c5d6e8cd23
commit 97a812f022
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 8 additions and 5 deletions

View File

@ -24,6 +24,7 @@ register_svg_icon "file-image"
# route: /admin/plugins/chat # route: /admin/plugins/chat
add_admin_route "chat.admin.title", "chat" add_admin_route "chat.admin.title", "chat"
hide_plugin
GlobalSetting.add_default(:allow_unsecure_chat_uploads, false) GlobalSetting.add_default(:allow_unsecure_chat_uploads, false)

View File

@ -10,3 +10,4 @@ enabled_site_setting :checklist_enabled
register_asset "stylesheets/checklist.scss" register_asset "stylesheets/checklist.scss"
register_svg_icon "spinner" register_svg_icon "spinner"
hide_plugin

View File

@ -7,7 +7,7 @@
# url: https://github.com/discourse/discourse/tree/main/plugins/discourse-details # url: https://github.com/discourse/discourse/tree/main/plugins/discourse-details
enabled_site_setting :details_enabled enabled_site_setting :details_enabled
hide_plugin if self.respond_to?(:hide_plugin) hide_plugin
register_asset "stylesheets/details.scss" register_asset "stylesheets/details.scss"

View File

@ -6,7 +6,7 @@
# authors: Jan Cernik # authors: Jan Cernik
# url: https://github.com/discourse/discourse-lazy-videos # url: https://github.com/discourse/discourse-lazy-videos
hide_plugin if self.respond_to?(:hide_plugin) hide_plugin
enabled_site_setting :lazy_videos_enabled enabled_site_setting :lazy_videos_enabled
register_asset "stylesheets/lazy-videos.scss" register_asset "stylesheets/lazy-videos.scss"

View File

@ -5,7 +5,7 @@
# version: 0.1 # version: 0.1
# author: Joffrey Jaffeux # author: Joffrey Jaffeux
hide_plugin if self.respond_to?(:hide_plugin) hide_plugin
register_asset "stylesheets/common/discourse-local-dates.scss" register_asset "stylesheets/common/discourse-local-dates.scss"
register_asset "moment.js", :vendored_core_pretty_text register_asset "moment.js", :vendored_core_pretty_text

View File

@ -7,7 +7,7 @@
# url: https://github.com/discourse/discourse/tree/main/plugins/discourse-narrative-bot # url: https://github.com/discourse/discourse/tree/main/plugins/discourse-narrative-bot
enabled_site_setting :discourse_narrative_bot_enabled enabled_site_setting :discourse_narrative_bot_enabled
hide_plugin if self.respond_to?(:hide_plugin) hide_plugin
if Rails.env == "development" if Rails.env == "development"
# workaround, teach reloader to reload jobs # workaround, teach reloader to reload jobs

View File

@ -7,7 +7,7 @@
# url: https://github.com/discourse/discourse/tree/main/plugins/discourse-presence # url: https://github.com/discourse/discourse/tree/main/plugins/discourse-presence
enabled_site_setting :presence_enabled enabled_site_setting :presence_enabled
hide_plugin if self.respond_to?(:hide_plugin) hide_plugin
register_asset "stylesheets/presence.scss" register_asset "stylesheets/presence.scss"

View File

@ -7,6 +7,7 @@
register_asset "stylesheets/styleguide.scss" register_asset "stylesheets/styleguide.scss"
enabled_site_setting :styleguide_enabled enabled_site_setting :styleguide_enabled
hide_plugin
load File.expand_path("../lib/styleguide/engine.rb", __FILE__) load File.expand_path("../lib/styleguide/engine.rb", __FILE__)