def deny_overrides

bend-kit-authz@0.1.0.0 · authz.bend:139

import bend-kit-authz@0.1.0.0/authz.bend as Authz
import Base

139# Deny wins, then Allow, then Abstain.
140def deny_overrides(a: Decision, b: Decision) -> Decision:
141  match a:
142    case Deny{}:
143      Deny{}
144    case Abstain{}:
145      b
146    case Allow{}:
147      match b:
148        case Deny{}:
149          Deny{}
150        case Allow{}:
151          Allow{}
152        case Abstain{}:
153          Allow{}

Uses (1)

Used by (1)