SAP / spartacus

Spartacus is a lean, Angular-based JavaScript storefront for SAP Commerce Cloud that communicates exclusively through the Commerce REST API.
Apache License 2.0
740 stars 386 forks source link

Anonymous Consent Error #5820

Closed CarlEricLavoie closed 4 years ago

CarlEricLavoie commented 4 years ago

Environment Details

Steps to Reproduce

  1. Do not enable anonymous consent feature in the app.module.ts
  2. Clear storage to prevent any existing cookie / storage from displaying the banner
  3. Load any page

Observed Results

'View details' is displayed in the cookie tracking banner

Expected Results

The details should not be accessible for anonymous user given that I have not enable anonyous consent. Also, if the user clicks on 'select all' or chooses some values and closes the modal, an error will appear in the log because 'consentState' doesn't exist.

2019-12-15_11-51-59

Offer to Fix

No

CarlEricLavoie commented 4 years ago

On a side note, clicking 'view details' currently dismisses the cookie banner which results in user 'approving' of cookies, which in my opinion is not the case. The user should have to explicitly approve.

KateChuen commented 4 years ago

@znikola Can you comment please? We should not see the banner at all, right?

bgambocjaviniar commented 4 years ago

PR develop: GH-6800 PR maintenance: GH-6801

console error has already been fixed, but PR includes the issue above on hiding banner when anonymous config feature is not enabled

bgambocjaviniar commented 4 years ago

Closing as it is CMS-driven and please look at the documentation https://sap.github.io/cloud-commerce-spartacus-storefront-docs/anonymous-consent/#enabling-anonymous-consent

The banner is part of the cms component, therefore you can either remove or add it depending on you needs