mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 12:54:32 +08:00
FEATURE: settings tab for permalinks (#30192)
Setting tab should be added to permalinks so admins do not need to have left `/permalinks`. A new component called `AreaSetting` was added to avoid duplications and simplify adding settings to other sections.
This commit is contained in:

committed by
GitHub

parent
4305b64460
commit
fdb6634fa9
@ -12,7 +12,8 @@ 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[:plugin].blank? && params[:categories].blank? && params[:filter_names].blank? &&
|
||||
SiteSetting.valid_areas.exclude?(params[:filter_area])
|
||||
raise Discourse::InvalidParameters
|
||||
end
|
||||
|
||||
@ -21,6 +22,8 @@ class Admin::Config::SiteSettingsController < Admin::AdminController
|
||||
SiteSetting.all_settings(
|
||||
filter_names: params[:filter_names],
|
||||
filter_area: params[:filter_area],
|
||||
filter_plugin: params[:plugin],
|
||||
filter_categories: Array.wrap(params[:categories]),
|
||||
include_locale_setting: false,
|
||||
include_hidden: true,
|
||||
filter_allowed_hidden: ADMIN_CONFIG_AREA_ALLOWLISTED_HIDDEN_SETTINGS,
|
||||
|
Reference in New Issue
Block a user