FEATURE: Groundwork for schema theme settings UI (#25673)

This commit is the first of a series of commits that will allow themes to define complex settings types by declaring a schema of the setting structure that Discourse core will use to build a UI for the setting automatically. We implement the navigation logic and support for multiple levels of nesting in this commit and we'll continue building this new system gradually in future commits.

Internal topic: t/116870.
This commit is contained in:
Osama Sayegh
2024-02-16 09:31:49 +03:00
committed by GitHub
parent 5935148bd8
commit 9329a5395a
8 changed files with 481 additions and 0 deletions

View File

@ -329,6 +329,10 @@ class Admin::ThemesController < Admin::AdminController
render json: updated_setting, status: :ok
end
def schema
raise Discourse::InvalidAccess if !SiteSetting.experimental_objects_type_for_theme_settings
end
private
def ban_in_allowlist_mode!