Expense Approval Allows Authors to Approve Their Own Requests
Level 2 · node · Security · Missing separation-of-duties check for expense approval
Scenario
A fictional expense management service requires submitted requests to be approved by a different employee. Approvers must have approval permission and must not be the request author. The current service checks permission but allows authorized employees to approve their own expenses.
Requirements
Allow approval only when the actor has approval permission and is different from the request author. Reject self-approval and actors without permission. Rejected attempts must leave the request pending.
Acceptance criteria
- A permitted approver other than the author changes the status to approved.
- The author cannot self-approve even with approval permission.
- An actor without approval permission cannot approve.
- Rejected attempts do not change the existing status.