def intersect
import bend-kit-authz@0.1.0.0/authz.bend as Authzimport Base
155# Allow only when both allow. Deny wins over Abstain.
156def intersect(a: Decision, b: Decision) -> Decision:
157 match a:
158 case Deny{}:
159 Deny{}
160 case Allow{}:
161 b
162 case Abstain{}:
163 match b:
164 case Deny{}:
165 Deny{}
166 case Allow{}:
167 Abstain{}
168 case Abstain{}:
169 Abstain{}