authenticate config
array of productId
injected service used to handle the catalog related operations
injected API used to handle the organization related operations
injected logger used to handle the logging
request context [headers, body, params, query].
200 Status Ok
This validator is used to check if the user is normal organization owner or admin for product ids by applying the following steps in sequence:
Get the products from the productIds (productService.getProducts)
Get the orgIds from the products
Get the organizations from the orgIds (organizationAPI.getOrganizationById using loop)
Check if the organizations status is normal
Authenticate the user token (authenticate)
Check if the user is admin or owner of product organizations (organizationAPI.getUserOrganizations)
Return 200 Status Ok
403 NBError Forbidden
404 NBError Not found
There is a potential performance issue if this is performed over many organizations. Limit the amount of organizations per product to guarantee good performance.
Generated using TypeDoc
Is user normal organization owner or admin for product ids validator