A hidden delete button shows interface intent. It does not prove that the delete endpoint rejects a user without permission. Permission testing must reach the server operations and data paths behind the screen.
Build a matrix of actors, resources, actions, and lifecycle changes. Pair each denied case with an allowed case so a broken endpoint cannot masquerade as successful enforcement.
Inventory actions across every entry point
List reads, creates, updates, deletes, exports, uploads, downloads, invitations, and administrative changes. Identify page requests, API routes, background jobs, shared links, and external callbacks that can reach each action.
For each operation, state the expected decision using current membership, role, resource ownership, and relevant state. The interface can reflect that decision, but it must not be its only enforcement point.
Build a fictional two-workspace test matrix
Create one owner, one editor, one viewer, and one outsider across two fictional organisations. Give each organisation a customer record, an uploaded file, and an exportable report. Use clearly distinct fixture values so accidental cross-tenant results are visible.
As a viewer, attempt an update through the normal screen and a direct request. As an editor, try deleting a record if deletion is owner-only. As an outsider, request a known record and file identifier. Submit a bulk operation that mixes permitted and forbidden records, then verify the agreed all-or-partial behaviour.
Inspect stored state after rejected mutations. A response that says forbidden while a background task still changes the record is a failed permission boundary. Check generated exports for both rows and metadata, including filenames or counts that could reveal another organisation's activity.
Add permission changes during active work
Open a form as an editor, downgrade the account to viewer, then submit. Remove membership while an export is queued. Switch organisations in another tab while a request is pending. Record the expected decision and the trusted context used by the operation.
These transitions expose assumptions that a static role screenshot misses. They also require a defined freshness policy; otherwise, the team cannot tell whether delayed revocation is a defect or accepted behaviour.
The tradeoff is coverage versus maintenance. Start with high-impact operations and common role boundaries, then add regression cases for real defects. Avoid a vast set of shallow checks that nobody can interpret when the role model changes.
OWASP's authorisation reference provides broader guidance. The StackFlight case study supplies related SaaS context without claiming that this hypothetical matrix has been executed there.
Questions about permission testing
Is checking status codes enough?
No. Confirm response content, stored changes, queued effects, files, and exports. An error response can coexist with an unintended side effect.
Should tests bypass the interface?
Yes, for server enforcement checks. Also test the interface so legitimate users receive clear affordances and useful errors.
What belongs in a permission bug report?
Include the actor, organisation, action, resource, expected decision, actual response, and observed stored effect. Bring a minimal fixture to a permissions review.