LLM configs: edit/delete buttons available for all rows
Previously gated to tenant-owned rows (tenant_id != null), which made seed-from-catalog rows uneditable since they default to platform scope on the backend. The backend doesn't enforce extra ownership rules on update/delete either, so the gate was a UI overreach. Buttons now appear on every row. Tooltips clarify when a row is a platform default so the operator knows the change applies broadly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -425,28 +425,26 @@ function ConfigRow({
|
||||
aria-label={c.enabled ? "Disable" : "Enable"}
|
||||
data-action={`llm-config-enabled-${c.id}`}
|
||||
/>
|
||||
{c.tenant_id != null ? (
|
||||
<>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
onClick={onEdit}
|
||||
data-action={`llm-config-edit-${c.id}`}
|
||||
aria-label="Edit"
|
||||
>
|
||||
<Pencil className="size-4" />
|
||||
</Button>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
onClick={onDelete}
|
||||
data-action={`llm-config-delete-${c.id}`}
|
||||
aria-label="Delete"
|
||||
>
|
||||
<Trash2 className="size-4" />
|
||||
</Button>
|
||||
</>
|
||||
) : null}
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
onClick={onEdit}
|
||||
data-action={`llm-config-edit-${c.id}`}
|
||||
aria-label="Edit"
|
||||
title={c.tenant_id == null ? "Edit platform default (visible to all tenants)" : "Edit"}
|
||||
>
|
||||
<Pencil className="size-4" />
|
||||
</Button>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
onClick={onDelete}
|
||||
data-action={`llm-config-delete-${c.id}`}
|
||||
aria-label="Delete"
|
||||
title={c.tenant_id == null ? "Delete platform default" : "Delete"}
|
||||
>
|
||||
<Trash2 className="size-4" />
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user