Resources

/

ACP Lab Notes

[Part 36] Allowing Reads and Managing File Export Separately

Database access control

November 9, 2026

Viewing orders may be sufficient for a shipping check. I wanted file downloads authorized separately according to the task.

 

I first downloaded three orders, then disabled only Can Export on the same web SQL privilege and checked the result.

 

 

Allowing Reads and Exports Initially

 

I created Web Export Lab and privilege Lab - Web Export Control, selected SQL Select, and enabled Can Export. Can Import and Can Copy To Clipboard remained off.

 

Screen 1. User view confirms Select and Can Export.
Screen 1. User view confirms Select and Can Export.

 

Demo Developer received the privilege and connected in the web editor using the three fictional orders from earlier.

 

 

Checking the Downloaded CSV

 

Querying 27001–27003 returned status and amount, and Export was available.

 

Screen 2. Querying three orders and choosing Export.
Screen 2. Querying three orders and choosing Export.

 

In Export, I selected CSV File and included field names in the first row before exporting.

 

Screen 3. CSV format and header-row option.
Screen 3. CSV format and header-row option.

 

The ZIP’s export.csv contained order_id, status, total_amount and all three orders. Values, including 27002 SHIPPED 18500.00, matched the grid.

 

Screen 4. Actual CSV includes the headers and exactly three orders.
Screen 4. Actual CSV includes the headers and exactly three orders.

 

 

Disabling Only Can Export

 

I disconnected and reopened Lab - Web Export Control as administrator. I retained Select and cleared only Can Export, then saved without changing data scope or SQL privileges.

 

Screen 5. Select stays; only file export is removed.
Screen 5. Select stays; only file export is removed.

 

Demo Developer reconnected and ran the same SQL for IDs, statuses, and amounts.

 

 

Orders Remain Visible, Export Is Disabled

 

The same three orders returned, but both top-level Export and result-grid Export were greyed out and unusable.

 

Screen 6. New connection allows reads but disables web Export.
Screen 6. New connection allows reads but disables web Export.

 

Repeating the query still worked. Everyday checking continued while file downloads were governed by separate permissions.

 

 

Checking the Export Record

 

Query Audit for Demo Developer/Web Export Lab showed three reads and one export, four records total.

 

The download-time record was classified as Export Data. Details showed user, connection, Lab - Web Export Control, Web Editor route, target table, SQL, and success.

 

Screen 7. CSV export recorded as Export Data, with user and SQL.
Screen 7. CSV export recorded as Export Data, with user and SQL.

 

Necessary orders remained readable while web exports had their own permission and audit trail. That helps tailor the editor’s capabilities to the person’s job.

 

This lab used QueryPie Community 11.6.7/MySQL 8.0.42 web SQL editor and test orders. I revoked only this lab connection’s privilege afterward, keeping existing data and grants intact.

 

Reference: Privilege Type · Web SQL editor · Query Audit