core.shallowmatchesresourcepolicy
Home > @medplum/core > shallowMatchesResourcePolicy
shallowMatchesResourcePolicy() function
Shallow check if the given interaction on a resource type matches the resource access policy. Does not evaluate the policy's compartment or criteria.
Signature:
export declare function shallowMatchesResourcePolicy(policy: AccessPolicyResource, resourceType: ResourceType, interaction: AccessPolicyInteraction): boolean;
Parameters
Parameter | Type | Description |
|---|---|---|
policy | AccessPolicyResource | The AccessPolicy resource policy. |
resourceType | ResourceType | The candidate resource type. |
interaction | Interaction type to check against the policy. |
Returns:
boolean
True when the resource type matches the resource policy.