def judge
import cswap-bend-cli@0.1.0.0/store/plan.bend as Planimport Base
181# Does the credential's owner match (email, org, accountUuid)? Uuid first,
182# then the address only when no uuid is on file; the org is checked either way.
183# None from the oracle is "unresolvable", never "wrong".
184def judge(+email: String, +org: String, +acct_uuid: String, +p: Prof) -> Verdict:
185 match p:
186 case ProfNone{}:
187 VUnverified{"the identity lookup did not resolve"}
188 case Prof{uuid, pemail, porg}:
189 then_org(ident_verdict(email, acct_uuid, uuid, pemail), email, org, porg)