core.canwriteresource | Medplum

canWriteResource() function

Warning: This API is now obsolete.

Use satisfiedAccessPolicy() instead.

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

Parameter Type Description
accessPolicy AccessPolicy The access policy.
resource Resource The resource.

Returns:

boolean

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