mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 07:49:48 +08:00
DEV: allow the plugin to register valid site setting areas (#29432)
In this PR, we defined the ability to group site settings by area - https://github.com/discourse/discourse/pull/28570 Plugins should be able to register in their own areas.
This commit is contained in:

committed by
GitHub

parent
4529b0614c
commit
0839bce7b6
@ -12,7 +12,7 @@ class Admin::Config::SiteSettingsController < Admin::AdminController
|
||||
# UI itself uses the Admin::SiteSettingsController#index endpoint,
|
||||
# which also supports a `category` and `plugin` filter.
|
||||
def index
|
||||
if params[:filter_names].blank? && SiteSetting::VALID_AREAS.exclude?(params[:filter_area])
|
||||
if params[:filter_names].blank? && SiteSetting.valid_areas.exclude?(params[:filter_area])
|
||||
raise Discourse::InvalidParameters
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user