Problem/Motivation

For authenticated users the consent status (or cookie value of COOKiES cookie) should be saved to the DB-store. So if auth user visit the site with another browser (or using a safe (incognito) browser, that clears all cookies, activities and caches by default) they don't have to re-evaluate their decisions.

Proposed resolution

  • Use callback function from cookiesjsr for an action-handler, that saves the user decision to the key-value store.
  • Hook up when user logs in, if cookie 'cookiesjsr' for user:xy is stored.
  • -> IF FALSE: do nothing.
  • -> IF TRUE: Look up if cookie 'cookiesjsr' was already set in anonymos state.
  • ---> IF TRUE: Update store with current state.
  • ---> IF FALSE: Set cookie 'cookiesjsr' with recent evalution state from store.

User interface changes

none

API changes

New JSON controller called by cookiesjsr app when contsent state was set or updated.

Data model changes

none (using key-value store)

Issue fork cookies-3220281

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

JFeltkamp created an issue. See original summary.

jfeltkamp’s picture

Issue summary: View changes
jfeltkamp’s picture

Title: For authenticated users, save the user content status to key-value store » For authenticated users, save the user consent status to key-value store
jfeltkamp’s picture

Issue summary: View changes
anybody’s picture

Good idea! My 2 cent: As I know from other modules this may have impact on the performance, I'd suggest to make this optional, perhaps even as sub-module if it adds further dependencies to keep the base clean and simple :)

jfeltkamp’s picture

Status: Active » Needs review
jfeltkamp’s picture

To make review easier I created a branch with all changes to be reviewd: 1.0.14-rcx

anybody’s picture

Found and fixed a typo. I'm not using this feature at all and have no experience with it, so I'm not the right person to do the final review.

@JFeltkamp are you using these features in production?

  • JFeltkamp committed 9659d6c on 1.0.x
    Issue #3220281: For authenticated users, save the user consent status to...
jfeltkamp’s picture

Status: Needs review » Fixed

@Anybody: Yes, I use it in production.

I tested the new feature in these two sites without any problems. So I finally merged it.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.