--- vud_comment.module.orig	2010-03-12 13:36:45.000000000 +0530
+++ vud_comment.module	2010-03-17 21:22:42.509388313 +0530
@@ -10,7 +10,7 @@
  * Implementation of hook_perm().
  */
 function vud_comment_perm() {
-  return array('administer vote up/down on comments', 'use vote up/down on comments');
+  return array('administer vote up/down on comments', 'use vote up/down on comments', 'view vote up/down count on comments');
 }
 
 /**
@@ -74,10 +74,21 @@
     case 'view':
       $type = _vud_comment_get_node_type($comment->nid);
       $comment_allow = in_array($type, variable_get('vud_comment_node_types', array()), TRUE);
-      if ($comment_allow && user_access('use vote up/down on comments')) {
+      if ($comment_allow && (($can_edit = user_access('use vote up/down on comments')) || user_access('view vote up/down count on comments'))) {
         $tag = variable_get('vud_tag', 'vote');
         $widget = variable_get('vud_comment_widget', 'plain');
-        $comment->comment = theme('vud_widget', $comment->cid, 'comment', $tag, $widget) . $comment->comment;
+        $comment->comment = theme('vud_widget', $comment->cid, 'comment', $tag, $widget, !$can_edit) . $comment->comment;
+
+        $widget_message = t('Sorry, there was problem on the vote.');
+        if (!$can_edit) {
+          $widget_message = t('You are not allowed to vote.');
+        }
+        drupal_add_js(
+          array(
+            'vud_comment' => array('widget_message' => $widget_message),
+          ),
+          'setting'
+        );
       }
       break;
   }
@@ -117,7 +128,8 @@
       $votes_display_mode = variable_get('vud_comment_votes', 1);
       $widget_theme = variable_get('vud_comment_widget', 'plain');
       $tag = variable_get('vud_tag', 'vote');
-      if ($votes_display_mode) {
+      $view_vud_comment_votes_count = user_access('view vote up/down count on comments') || user_access('use vote up/down on comments');
+      if ($votes_display_mode && $view_vud_comment_votes_count) {
         $links['vud_comment_votes_count'] = array(
           'title' => theme('vud_votes', $comment->cid, $type, $tag, $widget_theme),
           'html' => TRUE,
