Expand description
Managing people and the agents that report for them.
Everything here is behind a session (ADR 0007) and a role. Two rules shape the routes, both settled before they were written (ADR 0008):
- A manager reads, an administrator writes. Until departments exist
there is nothing to scope a manager’s authority to, and handing out the
power to issue agent tokens company-wide - with no audit log yet to notice
- is not a default worth shipping.
- A token is shown once. The server keeps its SHA-256 and nothing else, so an issued token that was not written down is replaced, not recovered.
Structs§
- Agent
Row - An agent as the admin screens list it. Never the token.
- Issued
Agent - The one response that carries a token, and the only time it exists.
- NewAgent
- NewUser
- Password
Change - Changes one’s own password.
- User
Patch - A change to an existing person. Every field is optional; absent means “leave it alone” rather than “clear it”.
- UserRow
- A person as the admin screens list them.
Functions§
- change_
own_ password - create_
agent - Issues an agent token, shown once.
- create_
user - Creates a person.
- list_
agents - Lists someone’s agents, revoked ones included - a withdrawn token is part of the record of what happened.
- list_
users - Lists everyone. The one route a manager may call. Lists the people the caller may see.
- revoke_
agent - Withdraws an agent’s token. The row stays, so its uploads keep an owner.
- update_
user - Changes a person: their name, role, password, or whether they are active.