def permission_matches

bendvy-ecs-core@0.1.0.3 · execution_command_system.bend:116

import bendvy-ecs-core@0.1.0.3/execution_command_system.bend as ExecutionCommandSystem
import Base
import bendvy-ecs-core@0.1.0.3/execution_system.bend as Sys
import bendvy-ecs-core@0.1.0.3/execution_composer_layout.bend as Layout
import bendvy-ecs-core@0.1.0.3/execution_command_local.bend as Local

116# Raw constructors are trusted administrative provisioning. Canonical admission
117# validates the persisted cache against this owner's same closed declaration;
118# no World payload is projected and no separately supplied catalog is consulted.
119def permission_matches(~S:Data,~C:Type,~R:Type,~E:Data,~layout:Layout.Layout,~resources:Layout.Layout,~route:Layout.Route,~Ops:Data -> (Type -> Type) -> Type -> Type -> Type,~User:Type,~Error:Data,~Out:Data,~declaration:Program(~S,~C,~R,~layout,~resources,~route,~Ops),~body:Body(~S,~layout,~resources,~route,~Ops,~User,~Error,~Out),checked:CheckedPermission<S,resources>,owner:Owner<S,C,R,E,layout,resources,route,Ops,User,Error,Out,declaration,body>) -> Owner<S,C,R,E,layout,resources,route,Ops,User,Error,Out,declaration,body> & Bool:
120  match owner:
121    case Owner{Sys.Owner{namespace,id,name,access,cursor,Local.Local{user,commands,+permission}}}:(Owner{Sys.Owner{namespace,id,name,access,cursor,Local.Local{user,commands,permission}}},checked_permission_agrees(~S,~resources,permission,checked))

Uses (12)

Used by (1)