Skip to main content

evaluate_policy

Function evaluate_policy 

Source
pub async fn evaluate_policy<CTX: Send + Sync + Clone + 'static, Client: FHIRClient<CTX, OperationOutcomeError> + Send + Sync + 'static>(
    context: Arc<PolicyContext<CTX, Client>>,
    policy: Arc<AccessPolicyV2>,
) -> Result<PermissionLevel, OperationOutcomeError>
Expand description

Evaluates an access policy using the configured policy engine.

ยงErrors

Returns an [OperationOutcomeError] when:

  • the policy engine denies access,
  • the rule engine fails while evaluating rules,
  • the policy contains an invalid or unsupported configuration.