def scope_routes
bendvy-ecs-core@0.1.0.3 · execution_lifetime_scope_coverage.bend:52
import bendvy-ecs-core@0.1.0.3/execution_lifetime_scope_coverage.bend as ExecutionLifetimeScopeCoverage
import Base
import bendvy-ecs-core@0.1.0.3/execution_command_permission.bend as Permission
import bendvy-ecs-core@0.1.0.3/execution_composer_layout.bend as Layout
52def scope_routes(-S:Data,-resources:Layout.Layout,relations:Permission.Relations<S,resources>) -> List<&2,Layout.Route>:
53 match relations:
54 case Permission.NoRelations{}:[]
55 case Permission.RelationAllowed{_,_,_,_,_,_,rest}:scope_routes(S,resources,rest)
56 case Permission.ScopeAllowed{route,_,_,_,_,rest}:route <> scope_routes(S,resources,rest)