Skip to content

QT desk: only the approver can rescind an approval (C8) - #132

Merged
dominickdupuy merged 1 commit into
mainfrom
qt/rescind-own-approval
Oct 14, 2026
Merged

dominickdupuy merged 1 commit into
mainfrom
qt/rescind-own-approval

Conversation

@dominickdupuy

Copy link
Copy Markdown
Member

Dom decided on 2026-10-14 that only the person who approved a day can take the approval back.

  • API: insert_rescind refuses with 409 "The book was approved by ; only they can take the approval back" unless the requesting user is the approval's published_by (e-mails compared without case). The check runs under the day lock, so nothing is written on a refusal.
  • Frontend: rescindBlockedReason(state, nowMs, userEmail) returns a reason for anyone else. DeskPanel passes the signed-in user's e-mail, so Rescind approval shows only to the approver.
  • Engine: checks the same rule again (trade-ngin #203).

Tests: use case, a real-database integration test (another user is refused and nothing is written; the approver succeeds whatever the case of the e-mail), and desk.test.ts. An existing integration test that rescinded as a@x/b@x now uses the approver.

The API refuses a rescind (409) unless the user asking is the approval's
published_by (e-mails compared without case), under the day lock; the desk
shows "Rescind approval" only to that user. The engine checks the same again
(trade-ngin #203).
@dominickdupuy
dominickdupuy merged commit 6a577ea into main Oct 14, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant