Skip to main content

isAllowedToDeleteFarm

@svenvw/fdm-source


@svenvw/fdm-source / fdm-core/src / isAllowedToDeleteFarm

Function: isAllowedToDeleteFarm()

isAllowedToDeleteFarm(fdm, principal_id, b_id_farm): Promise<boolean>

Defined in: fdm-core/src/farm.ts:569

Checks if the specified principal is allowed to delete a given farm.

This function verifies if the acting principal has 'write' permission on the farm.

Parameters

fdm

any

The FDM instance providing the connection to the database. The instance can be created with createFdmServer.

principal_id

any

The identifier of the principal whose permissions are being checked.

b_id_farm

any

The identifier of the farm.

Returns

Promise<boolean>

A Promise that resolves to true if the principal has 'write' permission, false otherwise.