MCPcopy Create free account
hub / github.com/hashintel/hash / build

Method build

libs/@local/graph/authorization/src/policies/context.rs:121–131  ·  view source on GitHub ↗

Builds the context. It will compute the transitive closure of the entities in the context. # Errors - [`ContextError::TransitiveClosureError`] if the transitive closure computation fails.

(self)

Source from the content-addressed store, hash-verified

119 ///
120 /// - [`ContextError::TransitiveClosureError`] if the transitive closure computation fails.
121 pub fn build(self) -> Result<Context, Report<ContextError>> {
122 Ok(Context {
123 entities: Entities::from_entities(
124 self.entities,
125 Some(&PolicyValidator::core_schema()),
126 TCComputation::ComputeNow,
127 Extensions::none(),
128 )
129 .change_context(ContextError::TransitiveClosureError)?,
130 })
131 }
132}

Callers 15

fetch_ontology_typesMethod · 0.45
schemaMethod · 0.45
schemaMethod · 0.45
into_futureMethod · 0.45
instantiateFunction · 0.45
user_web_permissionsFunction · 0.45
org_web_permissionsFunction · 0.45
schemaMethod · 0.45

Calls 2

OkInterface · 0.85
change_contextMethod · 0.45

Tested by 15

instantiateFunction · 0.36
user_web_permissionsFunction · 0.36
org_web_permissionsFunction · 0.36
transpile_offsetFunction · 0.36
transpile_join_onFunction · 0.36
transpile_join_usingFunction · 0.36