Skip to main content

core.canwriteresourcetype

Home > @medplum/core > canWriteResourceType

canWriteResourceType() function

Determines if the current user can write the specified resource type. This is a preliminary check before evaluating a write operation in depth. If a user cannot write a resource type at all, then don't bother looking up previous versions.

Signature:

export declare function canWriteResourceType(accessPolicy: AccessPolicy, resourceType: ResourceType): boolean;

Parameters

Parameter

Type

Description

accessPolicy

AccessPolicy

The access policy.

resourceType

ResourceType

The resource type.

Returns:

boolean

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