Repository navigation
Link Persona inquiries staff create by hand in the dashboard - #342
Merged
Merged
Conversation
for account recovery, staff make an inquiry in the persona dashboard (reference id = the identity's public id) and send the user the hosted link directly. until now the webhooks for those inquiries matched nothing and were dropped. inquiry.created now carries the creator through: HCA's own inquiries say "API" and are ignored; anything else is matched against active super admins / manual document verifiers, and the inquiry becomes a draft PersonaVerification on the identity so the usual webhooks drive it. these never auto-approve — persona passing a document doesn't show the person owns the account — so they always land in manual review.
both were already failing on main:
- rubocop: missing spaces inside the array brackets in backup_code.rb
- brakeman: bin/brakeman runs --ensure-latest, so 8.1.0 coming out
failed every PR. bumped to 8.1.0, which raised two new warnings:
- a weak XSS on the email typo banner. it was already escaped, but
switching to an _html translation key lets rails do the escaping
and drops the manual html_escape + html_safe
- rails 8.0 EOL on 2026-11-07. ignored with a note — the 8.1
upgrade needs its own PR before then
Member
Author
|
heads up: rails 8.0 support ends on 2026-11-07. brakeman 8.1.0 started flagging it, and since same commit also fixes two other things that were already broken on main:
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This was referenced Oct 19, 2026
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.
why
for account recovery we sometimes need someone to verify who can't sign in to auth.hackclub.com or read their email. staff make an inquiry by hand in the Persona dashboard, set the reference id to the identity's public id, and send the person Persona's hosted link.
until now, the webhooks for those inquiries matched no
VerificationorVerificationCaseand were dropped, so nothing ended up on the identity.what
inquiry.creatednow passes the inquiry'screatorandreference-idto the newPersona::LinkStaffInquiryJob. HCA's own inquiries havecreator: "API", so they're skipped in the controller.PersonaVerificationon the identity, so the usual completed / approved / declined webhooks handle it from there. the activity log records which reviewer linked it.STAFF_CREATED_ISSUEand always go to manual review.before merging
inquiry.createdis enabled on the Persona webhook subscriptionnot covered
tests
14 new examples, all passing, and rubocop is clean on the changed files. the full suite has 74 failures, but it's the same 74 with and without this change. most come from the
:pendingverification factory trait building a persona record with a mismatched inquiry id. separately,schema.rbon main is missing theregistration_ipmigration.