Skip to content

[P1/bug] Grid edits and admin actions bypass the production confirmation #588

Closed

Description

@EVWorth

Context

resultStore.executeQuery holds the production gate: on a connection marked production, a destructive statement raises the app’s own confirmation before anything runs. RoutineViewer.tsx:205 documents this — dropping a routine was moved onto the store precisely because going straight to IPC skipped the gate (#393).

Problem

The same bypass is still live elsewhere. These send destructive SQL through api.executeQuery, skipping the gate entirely:

  • src/components/grid/ResultsGrid.tsx:449 — the UPDATE/DELETE batch from inline cell editing
  • src/components/admin/UserManagement.tsx — DROP USER, REVOKE
  • src/components/import/ImportDialog.tsx:206 and src/components/backup/RestoreDialog.tsx:146 — every statement of a dump, which can include DROP TABLE

Editing a cell in a grid pointed at production writes with no confirmation. #393 fixed one call site; the pattern was never swept.

Expected

Destructive statements go through the gate whatever issued them. Bulk paths (import, restore) confirm once for the operation rather than per statement.

Acceptance

Editing a cell on a connection marked production raises the confirmation; cancelling leaves the row unchanged; a restore confirms once and not per statement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/cross-cuttingkind/bugseverity/p1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions