Message keeps reappearing

niallhatton - March 11, 2009 - 12:10
Project:Admin message
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

I am having some problems with the Admin message module D6 Dev release.

If i close a admin messge using the superadmin account it closes and remembers that I closed it, however authenticated users get the message everytime they refresh the page, or goto another page where that block would appear.

I was under the impression once the message has been closed, it will not be shown to the same user. Have I just misunderstood how this module works, Am i missing somthing. Please Help

Kind Regards

Niall

#1

yhahn - March 15, 2009 - 01:29

Does the authenticated user in question have the "close admin messages" permission? This is what controls the menu access callback that records an entry for the user as having closed the message.

#2

catofcheshir - March 25, 2009 - 06:18
Component:Miscellaneous» Code
Category:support request» bug report

I have same problem. And i can't found "close admin messages" permission at /admin/user/permissions, or any other permissions for admin message module...

#3

parasolx - April 24, 2009 - 01:32

me also.. i have done make the patch still the message keep appearing for users and also for admin

#4

mckeen_greg - May 14, 2009 - 12:20

No permissions are listed on my site either. Im using the latest dev release of D6.

#5

soxion - June 11, 2009 - 11:02

The module seems to be missing the following hook:

function admin_message_perm() {
   return array('close admin messages');
}

To fix this:
1. Copy the above code into the admin_message.module file (anywhere is fine) and save.
2. Set permissions so that the users can hide messages, to do this go to
Administer->User management->Permissions

#6

mckeen_greg - June 17, 2009 - 14:18

Thanks soxion. :)

I can confirm that #5 fixes this issue.

#7

fajerstarter - July 15, 2009 - 21:51
Status:active» needs review

Is there a need for a specific permission to close message or is it enough to let any logged in user close messages (as the Drupal in 5.x)? I rather not add yet another permission if there is no user-case for it.

Attached path reverts to the 5.x access check.

AttachmentSize
398322.patch.txt 453 bytes

#8

Rosamunda - August 23, 2009 - 16:26

Yes, I think as fajerstarter. In 5.x version the user who closed the message wouldn´t see it again (unless you set that message to be on top of lists).
This should be the normal behaviour...
Subscribing to this, as I´m having the same problem here.

Maybe it could be a workaround to put some php code inside the box of each node, that tells you to show the message only if the user hadn´t clicked the "close" link before?

Rosamunda

#9

Rosamunda - August 24, 2009 - 17:56

I can confirm #7 works.
Didn´t tried the older patch, because I really, really, really don´t need another item in my permission´s list.
Thanks!!
Rosamunda

 
 

Drupal is a registered trademark of Dries Buytaert.