This patch started as a bug fix: the close link is shown even when the user doesn't have permission to close the message. This meant the user would click it, it'd disappear but then reappear when reloading the page.

This patch fixes it by generating the link and checking permissions in a preprocess function for the template.

Because the preprocess function now exists, I also took the liberty of moving the node prep into the preprocess function as well.

CommentFileSizeAuthor
admin_message_preprocess.patch1.75 KBdsnopek
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dsnopek’s picture

Status: Needs review » Fixed

Patch committed!

Status: Fixed » Closed (fixed)

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