fix(settings): code-managed keys in advanced panel only
Align can_edit lists with deploy SQL: runtime Montzar/price keys stay in tenant advanced settings (read-only), not super admin catalog. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -214,6 +214,7 @@ import {
|
||||
formatValueForSave,
|
||||
helpText,
|
||||
isSettingVisible,
|
||||
isCodeManagedSettingKey,
|
||||
isSettingLocked,
|
||||
isSettingActive,
|
||||
isSwitchOn,
|
||||
@@ -308,6 +309,7 @@ const filteredRows = computed(() =>
|
||||
(baseData.value || []).filter((row) => {
|
||||
if (row.id == null || !matchesFilter(row)) return false
|
||||
if (!isSettingVisible(row.key)) return false
|
||||
if (isCodeManagedSettingKey(row.key) && !isSystemMode.value) return false
|
||||
if (isSystemMode.value) return true
|
||||
return isEditable(row)
|
||||
})
|
||||
@@ -427,6 +429,7 @@ function rowColSpan(row: Const): number {
|
||||
}
|
||||
|
||||
function isReadonly(row: Const): boolean {
|
||||
if (isCodeManagedSettingKey(row.key)) return true
|
||||
if (isSystemMode.value) return false
|
||||
return isSettingLocked(row.can_edit)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user