An export can expose an entire customer dataset through a path that looks unrelated to the main dashboard. Test it as a separate workflow with its own request, processing, storage, and download boundaries.
The permission check at export creation is important, but it is not the only decision. A generated file may remain available after the requester changes role or leaves the organisation.
Trace the export through every stage
Identify who can request it, which records are selected, which fields are included, where the file is stored, how the user learns it is ready, and who can download it. Include temporary files, cached results, and shared links.
Define the policy for membership changes between request and download. A job can be valid when queued while delivery later becomes inappropriate. The product needs an explicit rule, not whatever the storage URL happens to allow.
Exercise a fictional two-organisation report
Create organisations Olive and Beech with distinct customer fixtures. Give a user export access to Olive only. Request an Olive report and inspect every row, column, filename, summary count, and embedded metadata for Beech information.
Try substituting another organisation's job identifier, requesting a mixed list of records, and opening a known report download URL under a different account. Repeat after the export role is removed and after membership ends.
Verify the allowed path too: an authorised Olive user should receive the expected complete report. A file containing no data is not proof of correct isolation if the query is broken. Compare it with the agreed field and row contract.
Review the export's data contract
A staff viewer may be allowed to see one request but not export every customer's contact details. Separate export permission from read permission when the product's responsibilities require it.
Limit fields to the stated purpose and document how long generated files remain available. If a source record is deleted, decide whether an already generated export remains under a retention policy or must be invalidated. That decision needs to include backups and support copies where relevant.
The tradeoff is convenience versus exposure. Reusable download links simplify support but may broaden access or persist longer than intended. Authenticated downloads can enforce current context while adding another application dependency. Choose and test the actual delivery design.
The PostgreSQL row-security reference is relevant if database policies contribute to selection. Verify the export worker's actual role. The StackFlight product account provides related export-workflow context without implying that these checks have been executed there.
Questions about export permissions
Does the dashboard permission protect exports automatically?
No. Export queries, workers, storage, and downloads can use different paths and credentials. Review each boundary.
Should export files live forever?
Choose a retention period based on purpose and policy. Make expiry and regeneration behaviour clear to users and support.
What should a regression test compare?
Compare expected rows and fields, ownership, download access, and role-change behaviour. Bring one redacted report to a data-export review.