mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 21:10:59 +00:00
Stop recording the address a delegate accepts a grant from
A consent record has to answer who consented and when, and the grant row already does. It does not have to answer from where, and an address kept for as long as both accounts exist is personal data held past the point it evidences anything. Nothing read the column, which makes it exactly the write-only field scripts/audit-column-readers.ts exists to surface. The acceptance stays evidenced: audit_logs records it with the caller's address under that table's own retention. The column never reached the wire, so the grant view and the OpenAPI contract are unchanged. Written before the feature shipped, so migration 0295 drops an empty column.
This commit is contained in:
1 parent
0d4b79d91b
commit
a463b1fa01
6 files changed
+33
-26
No files matched your search
@@ -7,10 +7,13 @@
|
||||
* row with `acceptedAt IS NULL` and why this route is the only thing that can
|
||||
* set it.
|
||||
*
|
||||
* The acceptance is also the consent record. `acceptedAt` and `acceptedIp` are
|
||||
* stamped here and never anywhere else, on the same row that carries who
|
||||
* offered the access and when it ended — one row, one history, no second
|
||||
* receipt table to disagree with it.
|
||||
* The acceptance is also the consent record. `acceptedAt` is stamped here and
|
||||
* never anywhere else, on the same row that carries who offered the access and
|
||||
* when it ended — one row, one history, no second receipt table to disagree
|
||||
* with it. The address the delegate accepted from is deliberately not part of
|
||||
* it: who and when is what a consent record has to answer, and an address kept
|
||||
* for the life of both accounts answers nothing further. The audit row below
|
||||
* still carries it, under `audit_logs`' own retention.
|
||||
*
|
||||
* Not delegable: bare `requireAuth()` refuses under a switch, so nobody can
|
||||
* accept an invitation while acting as somebody else. The delegate is the
|
||||
@@ -60,7 +63,6 @@ export const POST = apiHandler(
|
||||
const grant = await acceptGrant({
|
||||
grantId: id,
|
||||
granteeId: user.id,
|
||||
ip,
|
||||
});
|
||||
|
||||
const grantor = await prisma.user.findUniqueOrThrow({
|
||||
|
||||
Reference in new issue
Block a user