BrainDrive-Core icon indicating copy to clipboard operation
BrainDrive-Core copied to clipboard

Core Hardening — SettingsService Scope Casing Compatibility (`user` vs `USER`)

Open DJJones66 opened this issue 1 year ago • 0 comments

🛡️ Core Hardening — SettingsService Scope Casing Compatibility (user vs USER)

Objective

  • Ensure SettingsService reads existing settings instances regardless of scope casing differences (e.g., user vs USER).
  • Prevent duplicate instances from being created due to casing mismatches.
  • Normalize all writes to a canonical lowercase scope (user) while remaining backward-compatible with pre-existing uppercase rows.

Background

  • Some environments/databases contain settings with uppercase scopes (e.g., USER).
  • The current SettingsService queries/writes using lowercase (user). If an uppercase row exists, the service may fail to find it and create a duplicate lowercase row.
  • Standardizing scope handling avoids duplicate instances and reduces the need for ad-hoc plugin workarounds.

DJJones66 avatar Sep 08 '25 13:09 DJJones66