Problem/Motivation

Currently, when visiting the page /admin/config/system/cookiecontrol without permission to edit the civic cookie control settings, you still see the header:

Steps to reproduce

This issue is reproducible with a clean install:

  • Enable module.
  • Visit /admin/config/system/cookiecontrol as anonymous user.

Proposed resolution

Only show the header when the user has access to edit the settings.

CommentFileSizeAuthor
Screenshot 2021-06-02 at 13.46.27.png225.96 KBjeroent

Comments

JeroenT created an issue. See original summary.

jeroent’s picture

Version: 4.4.5 » 4.4.6

tper’s picture

Assigned: Unassigned » tper
Status: Active » Fixed

fixed in 4.4.7

jeroent’s picture

Status: Fixed » Needs work

I don't think the committed fix is the right solution, since the output of hook_theme will be cached. So this means that, depending on who visited the page first, anonymous users still see the header or authenticated user won't see the header.

  • tper committed 17ff3bd on 4.4.x
    tper: alternative fix for #3216931
    
tper’s picture

Version: 4.4.6 » 4.4.8
Status: Needs work » Needs review

A new fix is provided in version 4.4.8 that avoids the theme caching issue reported in https://www.drupal.org/project/civicccookiecontrol/issues/3216931#commen....

tper’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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