Agaric wants a way to decide who sees what status messages

Key words and phrases: 
theme status messages status_message Drupal switch status variable hide certain status messages from some roles
Description & Info: 

Agaric wants a way to hide certain status messages -- such as the one produced by the update status module! -- from certain users.

http://api.drupal.org/api/function/drupal_set_message/6
and
http://api.drupal.org/api/function/theme_status_messages/6

have no solution presently, and it's not clear they ever should-- what kind of hook would allow modules to see what module is setting a message and something about the message other than the text itself, which would be expensive to test on?

Something that could decide which messages show on the screen and wchich go to watchdog would be great, but again I don't see this being light enough weight.

Maybe the modules that matter should be asked to implement unique privileges. Truly, the update status module's "this is out of date" is the only one we want to hide from clients.

So an extra permission called in the module to test whether it should even call drupal_set_message ("view update status messages") would be all we need.

That's still a patch to Drupal 7 core. We (or some good soul with a Drupal shop that doesn't want unnecessarily bugging clients) should submit it as early as possible.

by Benjamin Melançon
Posted on Mon, 2008-04-21 17:11
in
Post new comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <h1> <h2> <h3> <h4> <h5> <h6> <small> <pre> <strike> <sub> <sup>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
  _____    ___     ___    ____    _____ 
|_ _| / _ \ / _ \ | __ ) | ___|
| | | | | | | (_) | | _ \ | |_
| | | |_| | \__, | | |_) | | _|
|_| \__\_\ /_/ |____/ |_|
Enter the code depicted in ASCII art style.