Repository navigation
QT desk: only the approver can rescind an approval (C8) - #132
Merged
Merged
Conversation
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
requested review from
colerottenberg,
jrile018,
patrickbott,
raohemdutt and
ry2009
as code owners
October 14, 2026 10:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dom decided on 2026-10-14 that only the person who approved a day can take the approval back.
insert_rescindrefuses with 409 "The book was approved by ; only they can take the approval back" unless the requesting user is the approval'spublished_by(e-mails compared without case). The check runs under the day lock, so nothing is written on a refusal.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.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.