Return to decisions list after inline approve/reject #131
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/decisions-inline-review-return"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What does this PR do?
Improves the decisions review UX: approving or rejecting a decision from the
/decisionsinline actions now redirects back to the decisions list, preserving the active filters, sort, and page, with the reviewed row rebadged approved or rejected, instead of landing on the decision detail page and requiring a Back click. This makes sequential review of many decisions much faster.returnTohidden field set to the current list URL (CurrentListPath, which already backs the step-up prompt return path).ReviewDecisionAsyncvalidatesreturnToas a local path and uses it for both the step-up-gate return path and the success/error redirect. Absent or non-local values fall back to the decision detail page, so the DecisionDetail page forms (which send noreturnTo) keep their prior behaviour of staying on the detail page.ReviewLabel/ReviewCss), so no new UI state was needed; the row simply shows its outcome once the list re-renders.AdminAuthEndpoints.SafeReturnPath, refactored to accept a caller-supplied fallback so the single validation implementation is shared rather than duplicated (guards against open redirect: rejects non-local, scheme-relative, and CR/LF values).Fixes #
How was this tested?
dotnet build Viegard.slnx- 0 errors, 0 warningsdotnet test(AdminApi suite) - 224 passed, including two new tests: inline review with a valid listreturnToredirects to that list URL; a non-localreturnTofalls back to the decision detail page and is not honouredChecklist