fix(settings): force can_edit=1 for runtime keys in API and DB writes

editable_only now includes RUNTIME_KEYS; normalize can_edit in responses.
UpdateConfig and montzar login persist can_edit=1. SQL override moved before COMMIT.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-19 20:15:28 +03:30
co-authored by Cursor
parent 027170a33f
commit b7eed369c6
4 changed files with 66 additions and 8 deletions
+6 -1
View File
@@ -444,9 +444,14 @@ class ConfigService
public function UpdateConfig($name, $value)
{
$payload = ['value' => $value];
if (SuperAdminProgramSettingsOverlay::isRuntime((string) $name)) {
$payload['can_edit'] = 1;
}
return Setting::updateOrCreate(
['key' => $name],
['value' => $value]
$payload
);
}