injected services
Optional
organizationAPI?: null | Pick<OrganizationDefaultAdapterAPI, "getUserOrganizations" | "getUserOrganizationRole">target field to get the user id from context
injected logger used to handle the logging
request context [headers, body, params, query]
200 Status OK
This validator will check if the user is an owner or admin of the same organization by applying the following steps in sequence:
Get the authenticated user from context
Get the organizations authenticated user belongs to
Get the user to edit from context
Get the organizations the user belongs to
Get common organizations between authenticated user and user
Check if the authenticated user is an owner or admin of the common organizations
400 NBError Bad Request
403 NBError Forbidden
500 NBError Internal Server Error
Generated using TypeDoc
Allow owner or admin user in the same organizations to access the resource