Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the way of getting consent status #44

Open
dogawaf opened this issue Nov 17, 2020 · 3 comments
Open

Document the way of getting consent status #44

dogawaf opened this issue Nov 17, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@dogawaf
Copy link

dogawaf commented Nov 17, 2020

Hello

In custom javascript code, it is sometimes usefull to get the consent status of a given app, when for example before writing a cookie.
Actually I use that: orejime.internals.manager.getConsent('my-app') but it sounds a little hacky.

Is there a better way to get the consent status of an app?

Regards

@felixgirault felixgirault self-assigned this Nov 18, 2020
@felixgirault felixgirault added enhancement New feature or request question Further information is requested labels Nov 18, 2020
@felixgirault
Copy link
Contributor

Hello,

For now it is the only way to do it but indeed it doesn't feel right...
We could proxy getConsent() at the top level object so it is usable directly, like orejime.getConsent('my-app').
(I would probably name it otherwise, I find the name getConsent a bit misleading).

Would it solve your problem ?
And while we're at it, do you see any other things that should be exposed publicly ?

@dogawaf
Copy link
Author

dogawaf commented Nov 18, 2020

Hello

Klaro! exposes directly the consentmanager.
I do not know if you keep the orejime fork updated with upstream Klaro, but maybe the way they did it could be nice.

https://kiprotect.com/docs/klaro/js_api

@felixgirault
Copy link
Contributor

It seems fine to me, it could be nice to be able to access the entire manager from the outside.
(Sadly we do not keep our fork in sync because we had to make impacting changes that made merging really hard...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants