updateRoleOfUserAtOrganization
@svenvw/fdm-source / fdm-core/src / updateRoleOfUserAtOrganization
Function: updateRoleOfUserAtOrganization()
updateRoleOfUserAtOrganization(
fdm
,admin_id
,organization_id
,username
,role
):Promise
<void
>
Defined in: fdm-core/src/organization.ts:812
Updates the role of a user within an organization.
Parameters
fdm
any
The FDM instance providing the connection to the database.
admin_id
string
The ID of the user initiating the update (must be owner or admin).
organization_id
string
The ID of the organization in which the user's role is being updated.
username
string
The username of the user whose role is being updated.
role
The new role to assign to the user.
"owner"
| "admin"
| "member"
Returns
Promise
<void
>
Throws
Throws an error if any database operation fails, if the user initiating the update does not have permissions, or if the user to be updated is not found.