User login

Agaric wants a way to decide who sees what status messages

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.

Resolution

Searched words: 
theme status messages status_message Drupal switch status variable hide certain status messages from some roles

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.