Skip to content

Typed settings model persisted per site #2704

Closed

Description

@pournasserian

Problem

Core features and plugins need configuration that administrators can change at runtime per site, with instance defaults and change notifications.

Proposal

Implement [Settings("area")] classes, cms_setting (site_id, key, json, updated_at, updated_by), ISettings<T>.GetAsync(site) resolving site override over instance default over code default, SetAsync raising SettingsChangedEvent, JSON schema generation per settings type for the admin and the Management endpoint, and the permission settings.{area}.manage.

Acceptance

  • A plugin settings class is readable and writable per site
  • Changing a setting raises an event and invalidates cached readers
  • The JSON schema of a settings type is produced from its attributes

Design: docs/planning/backend-technical-spec.md, section 4.13 (item B-33). Size: S.

Activity

  1. pournasserian commented on Nov 2, 2026

    @pournasserian
    MemberAuthor

    Note from #2738 (#2700): settings.{area}.manage is one permission per settings area, and this issue is where the areas appear. CorePermissions.Settings(area) builds the name. Add each settings classs permission to PermissionCatalogue, which closes the acceptance item #2700 left unticked. This issue adds cms_setting, so follow docs/system-migrations.md.

  2. pournasserian commented on Nov 3, 2026

    @pournasserian
    MemberAuthor

    From #2755. Publishing an event inside a SystemDbContext transaction throws FCMS2602, and there is no API to stage an outbox row in one yet. If settings publish change events from inside a transaction, add that API here; otherwise publish after the commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions