humanswitch/consentcookie

get configured consents

Closed this issue · 1 comments

Description

Let's say I configured ConsentCookie with three applications: A, B, and C.
I visit the website. I will get three consent cookies.
Now I change the configuration with only two applications: A and B.

If a plugin executes the following code:

ConsentCookie.get().consents

it will return all consents (cookies) which are found for the current visitor: A, B, and C.
But only A and B might be relevant.
Therefore it would be nice to have a function which only returns the configured consents. For example something like:

ConsentCookie.getConsentsConfigured()

Which come to think of it: maybe ConsentCookie.get() is a bit ambigious: what are you getting?! Maybe ConsentCookie.getConsents() is better?

Therefore it would be nice to have a function which only returns the configured consents. For example something like:

Discussed it, and the conclusion is that we should only return the Consents that are configured. The config of ConsentCookie should be leading in this. Currently the returned consents are the consents based on the persisted cookie value. This should be changed to be based on the configured apps.

Which come to think of it: maybe ConsentCookie.get() is a bit ambigious: what are you getting?! Maybe ConsentCookie.getConsents()

I agree that it is ambiguous. Will create another issue for this.