0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-06 13:08:40 +08:00
discourse/spec/jobs/scheduled
Martin Brennan b53dc3d9d3
FIX: Do not surface upcoming changes owned by unavailable plugins (#41575)
Upcoming changes can be registered by plugins, but nothing in the
upcoming changes framework knew whether the owning plugin was actually
configurable on a given site.

For unavailble plugins on our hosting, `SiteSettingExtension#setting`
already
forces the plugin's `enabled_site_setting` to false, and `all_settings`
already filters the change out of the Upcoming Changes page.

The notification paths for upcoming changes did not
follow suit...`UpcomingChanges::NotifyPromotion` and
`Jobs::NotifyAdminsOfAvailableUpcomingChanges` both gate only on
`ConditionalDisplay`, so admins were told a change had been enabled by
default for a plugin they cannot use and that is in fact still off.

`UpcomingChanges.enabled?` had the same blind spot for a different
reason, in that it reads the settings provider directly, bypassing the
getter's
configurability guard, so it returned true where the setting itself read
false.

Adds `UpcomingChanges.owning_plugin_configurable?` and short-circuits
both `ConditionalDisplay.should_display?` and `UpcomingChanges.enabled?`
on it. Core changes have no owning plugin and return early, so hot paths
such as `settings_hidden_while_enabled` are unaffected.

The gate keys on `configurable?` alone rather than mirroring the
getter's
narrower `enabled_site_setting == name` condition, a change gating a
sub-feature of an unavailable plugin is equally unavailable.
2026-07-13 10:01:52 +10:00
..
backfill_nested_reply_stats_spec.rb FIX: Run nested replies stats job on all topics when nested is default (#41510) 2026-07-07 14:30:53 -05:00
check_upcoming_changes_spec.rb FIX: Do not send notifications for upcoming changes not displayed (#40933) 2026-06-17 09:10:49 +10:00
directory_refresh_spec.rb DEV: refresh user directory more often for sites with few users (#39852) 2026-05-08 12:04:03 -04:00
notify_admins_of_available_upcoming_changes_spec.rb FIX: Do not surface upcoming changes owned by unavailable plugins (#41575) 2026-07-13 10:01:52 +10:00
notify_admins_of_problems_spec.rb FEATURE: Add problem checks page to admin panel and allow ignoring problem checks (#39103) 2026-04-23 08:28:33 +08:00