### Eclipse Workspace Patch 1.0
#P elvaco
Index: sites/all/modules/content_moderation/content_moderation.module
===================================================================
--- sites/all/modules/content_moderation/content_moderation.module	(revision 28)
+++ sites/all/modules/content_moderation/content_moderation.module	(working copy)
@@ -194,29 +194,31 @@
 
       break;
     case 'view':
-      $live = _content_moderation_live_revision($node->nid);
-      $live_vid = $live->vid;
-
-      if ($node->vid != $live_vid) {
-        // Get username for the revision rather than the original node.
-        $revision_author = user_load($node->revision_uid);
-        drupal_set_message(
-          t('The revision of this node has been created on @date by !author.',
-            array(
-             '@date'=> format_date($node->revision_timestamp, 'small'),
-             '!author'=> theme('username', $revision_author)
+      if(user_access('view content moderation messages')) {
+        $live = _content_moderation_live_revision($node->nid);
+        $live_vid = $live->vid;
+      
+        if ($node->vid != $live_vid) {
+          // Get username for the revision rather than the original node.
+          $revision_author = user_load($node->revision_uid);
+          drupal_set_message(
+            t('The revision of this node has been created on @date by !author.',
+              array(
+               '@date'=> format_date($node->revision_timestamp, 'small'),
+               '!author'=> theme('username', $revision_author)
+              )
             )
-          )
-        );
-      }
-      else {
-        $count = db_result(db_query('select count(vid) from {node_revisions} where vid>%d and nid=%d',$node->vid,$node->nid));
-        if($count == 1)
-          drupal_set_message(t('This document has 1 pending revision',array('@count' => $count)));
-        else if($count > 1) {
-          drupal_set_message(t('This document has @count pending revisions',array('@count' => $count)));
+          );
         }
-      }
+        else {
+          $count = db_result(db_query('select count(vid) from {node_revisions} where vid>%d and nid=%d',$node->vid,$node->nid));
+          if($count == 1)
+            drupal_set_message(t('This document has 1 pending revision',array('@count' => $count)));
+          else if($count > 1) {
+            drupal_set_message(t('This document has @count pending revisions',array('@count' => $count)));
+          }
+        }
+      }    
       break;
   }
 }
@@ -243,6 +245,9 @@
     }
     $rigths[] = "content moderation view $type moderation history";
   }
+  
+  // View content moderation messages
+  $rigths[] = 'view content moderation messages'; 
 
   return $rigths;
 }
