20.4 Who a click acts as
- Approved by
- Panaversity ·
In everyday life. In the hotel, the menu board cannot charge anyone. When a guest points at a dish, the clerk writes the order on that guest's room, after checking the room key. A board that tried to order for room 412 from the lobby would fail, because the clerk checks the key of the guest standing there.
What you will learn. Whose authority a button press carries, and why the connector checks it the same way as every other call.
Why it matters. This is the chapter's question. If a click carried more than the person's own rights, a screen would be a way around sign-in. If it carried less, the screen would break for people who are allowed.
One request, start to finish. At 10:16, Luis presses Next page.
- The page holds a handle, the sealed ticket from 17.4 that says where page two starts. Since 18.12, rule 4, it also names the company and the person it was made for. It holds no token, no key and no password.
- The page asks the AI app to call
next_invoice_pagewith that handle. - The AI app checks the request. Is this a tool a page may call? Does it come from this connector's page? It may also ask Luis first.
- The AI app sends the call on its own connection to the connector, with the sign-in token Luis gave it in Chapter 18. The token was made for this connector's address only (18.6).
- The connector checks it like any call. The token is valid and carries
ap:read(18.7). The company is Cedar Ridge, taken from the token and nowhere else, on one order slip for this request (18.11). The connector sets Cedar Ridge for one transaction (19.9). It opens the handle: made for Luis at Cedar Ridge, and less than 15 minutes old, the most a handle lasts (17.4). It returns rows 6 to 10, and writes the same audit line as for any call: company, person, app, tool and outcome (18.16).
The model chose nothing. The call still acted as Luis, for Cedar Ridge, with Luis's permissions, because those came from his token, not from the page.
Can the connector tell a click from the model's choice?
It should not need to. The call it receives carries the same token either way, and nothing in it is a promise that a person clicked. So the connector asks the same questions of every call, and a click gets no more and no less than the person behind it.
Could the page show Luis one of Brightline's invoices?
Only by getting past the connector's checks, and it cannot. Suppose the page were changed to ask for Brightline's INV-8301. The call still goes out with Luis's token, which names Cedar Ridge. The database, set to Cedar Ridge for this transaction, answers "not found", exactly as it would if Luis had typed the request. Row-level security (19.8) hides Brightline's rows, and every "not found" is the same, so the reply does not even say the invoice exists (19.10). A handle copied from Ana's screen fails too, because a handle is sealed for the caller who received it.
Priya Shah, the outside bookkeeper, belongs to both companies. Signed in for Cedar Ridge, her screen shows Cedar Ridge's rows only. Her token names the company she picked at sign-in (18.10). To see Brightline's, she signs in for Brightline, and gets a new token.

Figure 20.6. Two callers, one door. Every call meets the same four checks, whoever pressed what.
What if the model edits the screen?
The same rule holds. With app tools (20.3), the model can change what is on the screen, such as filling in a field. That change stays in the page until something saves it. Saving is a call to the connector, sent by the AI app with the person's token. So whether Luis types, clicks or lets the model edit, the connector checks the same token, company and scope.
Is a click an approval?
No. A click is a person's act, but not an approval. Every Brightline tool reads, so here it does not matter. When Chapter 25 adds the first tool that acts, an approval is a separate, recorded step that the connector checks, not a button that sent a call.
At work. In Lab 20, Task 5, the screen matrix runs these clicks as tests. Row C1 is Luis's next page. Row C3 has the page ask for INV-8301 and expects "not found". Row C5 replays Ana's handle under Luis's token and expects a refusal that says to start again from page one.
The operating rule: a click acts as the person who is signed in, for the company in their token, with the scopes their role gives, and never more. Check every call the same way, wherever it started.
Check yourself
Question 1 / 4
0 answered
When Luis presses Next page, whose sign-in token goes with the call, and who adds it?
- Owner
- Panaversity