def target.base

cswap-bend-cli@0.1.0.0 · policy/rank.bend:235

import cswap-bend-cli@0.1.0.0/policy/rank.bend as Rank
import Base
import cswap-bend-cli@0.1.0.0/policy/types.bend as T

235# A candidate that may be chosen: OAuth, enabled, not live, not barred.
236def target.base(+a: T.Account, +active: Nat, +bar: Maybe<&2, Nat>) -> Bool:
237  match a:
238    case T.Account{slot, email, kind, disabled}:
239      is_oauth(kind) && Bool.not(disabled) && Bool.not(Nat.is_eq(slot, active)) && Bool.not(barred(bar, slot))

Uses (9)

Used by (1)