Developer forum

Forum » Development » WebApi does not take user assortments into account for GetProduct

WebApi does not take user assortments into account for GetProduct

Anders Ebdrup
Anders Ebdrup
Reply

Dear Dynamicweb,

 

When requesting a product with a call like this: http://domain.dk/dwapi/ecommerce/products/SGK005/SP1524.SP2159.SP3525?CurrencyCode=DKK&CountryCode=DK&LanguageId=LANG1, then this method: HasAccessToProduct, does not take the bearer token into account, and the user is always null.

        internal bool HasAccessToProduct(Product product)
        {
            var result = IsBackendOrProductIsNothing(product);

            if (result is object)
            {
                return result.Value;
            }

            return InternalHasAccessToProduct(product, User.GetCurrentUser(PagePermissionLevels.Frontend));
        }

 

I really much hope that you can look into this as we need this to work?

 

Best regards,

Andes


Replies

 

You must be logged in to post in the forum