Approval Workflow
The Approval Workflow adds a review and approval layer for potentially dangerous database operations, designed for team environments where data safety is critical.
Overview
When a query requires approval, it is submitted for review instead of executing immediately. An authorized team member must approve or reject the query before it runs.
When Approval Is Required
Default Rules (No Custom Rules Configured)
When no custom approval rules are set up, the legacy behavior applies:
- Environment: Production connections only
- Query Type: Write queries (INSERT, UPDATE, DELETE, DROP, ALTER, TRUNCATE, CREATE)
- License: Only applies to activated (paid) licenses -- free users use Safe Mode instead
Custom Approval Rules
Team administrators can configure custom approval rules:
| Rule Field | Description |
|---|---|
| isActive | Whether the rule is currently enabled |
| applyToRoles | Which user roles this rule applies to (owner, admin, editor, viewer) |
| Environment Match | Which environments trigger the rule (DEV, STG, PROD, LOCAL, TEST) |
| Query Pattern | Regex or keyword pattern for matching queries |
Rule Evaluation
- Check if the user has an activated license (free users skip approval)
- If no custom rules exist, fall back to legacy behavior
- For each active rule:
- Check if the rule applies to the user's role
- Check if the environment matches
- Check if the query matches the rule pattern
- If any rule matches, the query requires approval
Approval Process
Submitting for Approval
- Write a query that triggers an approval rule
- Attempt to execute the query
- Instead of running, Tablen shows the approval dialog
- The query is submitted to the approval queue
Reviewing Pending Approvals
- Open Pending Approvals from the sidebar or menu
- View the list of queries awaiting approval
- Each entry shows:
- The SQL query
- Who submitted it
- When it was submitted
- Target connection and environment
- Why it requires approval
Approving or Rejecting
- Approve: The query is marked as approved and can be executed
- Reject: The query is rejected with an optional reason
After Approval
Once approved:
- The submitter is notified
- The query can be executed
- An audit log entry is created
Roles and Permissions
| Role | Can Submit | Can Approve | Can Reject |
|---|---|---|---|
| Owner | Yes | Yes | Yes |
| Admin | Yes | Yes | Yes |
| Editor | Yes | No (depends on rules) | No |
| Viewer | No | No | No |
Interaction with Safe Mode
Approval Workflow and Safe Mode are complementary:
- Safe Mode: Local confirmation dialogs (no server communication)
- Approval Workflow: Server-side review process requiring another person's approval
- Both can be active simultaneously
- Safe Mode works for all users; Approval Workflow requires a Team plan
Configuration
Approval rules are configured by team administrators through the Tablen server:
- Rules are cached locally after the first session
- Rules are refreshed on each new session
- Offline mode uses the cached rules
Audit Trail
All approval actions are recorded:
- Who submitted the query
- Who approved or rejected it
- When each action occurred
- The full SQL query text
See Audit Log for more details on audit tracking.