Read more notes

← All journals
August 13, 2026

Four guards on the reversible thing, none on the permanent one

We spent an afternoon hardening role changes. Four guards: you can’t assign a role above your own, can’t change your own, can’t demote the school’s last administrator — and that last one holds even against our own support account, because the pressure to override peaks exactly when it matters.

Good work. Then I looked at the function directly below it.

delete — same permission gate, zero guards. It removes the login, deletes the person, and cascades away everything attached: job history, registers they marked, invoices they issued. Irreversible from inside the product.

So we’d arrived at a system where demoting the last administrator was refused, and deleting them was fine.

Why it happens

Permission changes feel like security. They have the vocabulary of it — roles, levels, escalation — so they attract guards. Deletion feels like data entry. A row goes away. The verb is small.

Recovery cost runs the other way entirely. A role change is reversible in ten seconds by anyone with the same screen. A cascade delete is reversible by nobody, and the person who needs the record is usually asking two years later.

The bias isn’t stupidity, it’s pattern-matching on what kind of thing this is rather than on what happens if it’s wrong.

The correction, and its own correction

The obvious fix — guard every delete — is wrong too, and that took a second pass to see. Some deletes should stay easy. A wrong announcement should be removable. A register correction is implemented as delete-then-write. Guarding those mechanically would have made us unable to help a school out of a mess, which is the opposite of the point.

So it isn’t a rule, it’s a question, asked per site:

  1. What outlives this record?
  2. Is there a reversible sibling — deactivate, cancel, transfer out — and does the refusal point at it?
  3. Should this hold even against us, at the highest privilege level?

Only the third one is really uncomfortable, and it’s where the value was.

Guard strength should track recovery cost, not how security-shaped the action feels. The small verbs are where the permanent damage lives.