authenticate config
injected function used to authenticate the user
injected API used to handle the organization related operations
injected service used to handle the catalog related operations
which field to get the variantIds from context
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 variant ids by applying the following steps in sequence:
Get the variantIds from the context
Check if the variantIds is array
Get product variants by variantIds (productVariantService.getProductVariantsByIds)
Get productIds from variants
Check if the user is normal organization owner or admin for product ids (isUserNormalOrganizationOwnerOrAdminForProductIds)
500 NBError Internal server error
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 variant ids validator