Skip to main content

core.canwriteresource

Home > @medplum/core > canWriteResource

canWriteResource() function

Determines if the current user can write the specified resource. This is a more in-depth check after building the candidate result of a write operation.

Signature:

export declare function canWriteResource(accessPolicy: AccessPolicy, resource: Resource): boolean;

Parameters

ParameterTypeDescription
accessPolicyAccessPolicyThe access policy.
resourceResourceThe resource.

Returns:

boolean

True if the current user can write the specified resource type.