Permission Matrix Prompt
Make access auditable — a roles-by-actions matrix that shows exactly who can do what, exposes the gaps and over-grants, and becomes the spec the code is checked against.
Overview
Authorization that lives only in code is impossible to audit — no one can answer 'who can delete this?' without grepping. This prompt builds a permission matrix: roles across the top, actions/resources down the side, allow/deny in every cell, with the over-grants and missing denies flagged. It's the artifact that turns access control into something you can review and the code into something you can check against.
Why This Works
- A matrix makes over-grants visible that code review can't see
- Forcing every sensitive cell to be explicit removes silent default-allow
- It becomes the spec the implementation is checked against
Best for
- Systems where access mistakes are costly
- Compliance or security reviews needing an access map
- Teams that can't currently answer 'who can do X?'
Not for
- Designing the roles themselves — use the RBAC Design Prompt
- Reviewing the implementation — use the Authorization Review Prompt
Use cases
- Documenting who can do what across roles
- Auditing access control for over-grants
- Producing the spec authorization code is reviewed against