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

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.