A payment button disappears for an account without permission. Good—but can that account still open the form directly? What about the endpoint that creates the request, or the QR-code page afterward? That's the route we followed through a ‘Request partial payment’ feature.
With AI helping us read the Git history, we found a later commit adding a dedicated permission for the feature. This is a business-system example with identifying details left out. To find out which staff actually received that permission, we'd also need the deployed role settings.
The first version borrowed existing permissions
The earlier version borrowed existing permissions. Opening the form and fetching the QR code required general order-view access. Creating the request needed broader order-payment access, and the button followed that payment permission too.
Those were permission checks, but they weren't asking quite the same question. Someone who can view an order doesn't necessarily need to start a partial payment. Once the feature becomes a separate business action, its access rule needs to follow that decision.
The later change followed the whole path
The later commit added a dedicated part_pay check to the form, create-request endpoint, and QR-code endpoint. It changed the button visibility check too, and the codebase included a permission mapping for the action.
That gave us a path to review from end to end. The button was one stop on it. Someone might reach a form or result URL directly, so we wanted to see the checks on those routes as well.
We broke the review into five questions:
- Button: which permission decides whether staff see the action?
- Form: does opening the form check the same dedicated permission?
- Create endpoint: does the server check permission again before changing anything?
- QR-code endpoint: can someone request the result directly without entering through the button?
- Permission mapping: is the new permission defined, and which roles actually receive it?
The source can help answer the first four. For the last one, open the actual role settings too. A permission defined in code doesn't tell you which staff have been granted it.
We'd be careful about calling the whole flow secure from this one diff. We'd still check alternate routes, actual grants, and whether a QR-code request is tied to the correct record. What we could see here was that these particular routes had moved to the dedicated permission.
A useful review pattern for new actions
For another feature that changes money, stock, or customer data, follow the same route through the system:
- The page or button that introduces the action.
- The form that collects the request.
- The server endpoint that performs the action.
- Any related download, image, or result endpoint.
- The permission mapping and the actual grants used by staff roles.
This is a useful task to give AI during review: map the routes and show the permission check on each one. Then open every path it lists. It's easy for a neat summary to miss a less obvious result or download endpoint.
For testing, we'd use one role with permission and one without. Try the form and QR-code URL directly, then through the button. Also check that a rejected create request leaves no payment record behind. We didn't run those live-system tests in this Git review.
When you add a new action, trace it past the button. The form, the write endpoint, and the result can each have their own route into the feature.
The same payment feature also produced a different investigation: why an expired link could block a new request. Reviewing the route inventory and the record lifecycle separately made each question easier to verify.
Turn the route inventory into a test matrix
Use two test roles on a synthetic order: one with the feature permission and one without it. Give both only the underlying access your application normally requires, and record that setup. Otherwise, a denial caused by missing order access can hide a missing feature check.
| Entry point | Without feature permission | With feature permission |
|---|---|---|
| Button and direct form URL | Button hidden; direct access denied | Available when business conditions permit |
| Create endpoint | Denied; no new payment record | Still subject to order and amount validation |
| Direct QR-code URL | Denied | Only the authorized record is accessible |
Repeat the direct requests with a record outside the role’s permitted scope. A feature permission should not erase record-level access rules. The permission worksheet marks every observed result as Not tested until you run it. These are acceptance criteria to verify, not a claim that the historical change passed them.
