mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00

Previously, the SiteSetting::Update service allowed to update of a single site setting. In the About controller, we were using the loop through all settings - https://github.com/discourse/discourse/blob/main/app/controllers/admin/config/about_controller.rb#L39 It is suboptimal because if the 3 first settings are saved and the fourth is invalid, we will end with partially updated data. Changing SiteSetting::Update to accept hash means that we will check upfront if none of the settings are hidden or invalid and update all or none. Custom policies are used to report which settings are failing.