def granted.go
near-v-framework@0.4.0.0 · domain/architecture/environment/agreement/ops.bend:66
import near-v-framework@0.4.0.0/domain/architecture/environment/agreement/ops.bend as Ops
import Base
import near-v-framework@0.4.0.0/domain/architecture/environment/agreement/type.bend as G
66
67def granted.go(xs: List<&2, G.Grant>, +person: String, +scope: String) -> List<&2, String>:
68 match xs:
69 case []:
70 []
71 case G.Grant{+p, +sc, acts} <> rest:
72 Bool.pick(List<&2, String>, String.eq(person, p) && String.eq(scope, sc), acts, granted.go(rest, person, scope))