revokePrincipalFromFarm
@svenvw/fdm-source / fdm-core/src / revokePrincipalFromFarm
Function: revokePrincipalFromFarm()
revokePrincipalFromFarm(
fdm
,principal_id
,target
,b_id_farm
):Promise
<void
>
Defined in: fdm-core/src/farm.ts:415
Revokes a specified role from a principal for a given farm.
This function checks if the acting principal has 'share' permission on the farm, then revokes the specified role from the revokee.
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 performing the revoke (must have 'share' permission).
target
string
The username, email or slug of the principal whose role is being revoked.
b_id_farm
any
The identifier of the farm.
Returns
Promise
<void
>
Throws
If the acting principal does not have 'share' permission, or if any other error occurs during the operation.