Skip to main content

removeDerogation

@svenvw/fdm-source


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

Function: removeDerogation()

removeDerogation(fdm, principal_id, b_id_derogation): Promise<void>

Defined in: fdm-core/src/derogation.ts:101

Removes a derogation.

This function checks if the principal has 'write' permission on the associated farm, then deletes the derogation and its link to the farm.

Parameters

fdm

any

The FDM instance providing the connection to the database.

principal_id

any

The identifier of the principal removing the derogation.

b_id_derogation

any

The identifier of the derogation to remove.

Returns

Promise<void>

Throws

If the principal does not have permission, the derogation does not exist, or the database transaction fails.