Index: modules/comment.module
===================================================================
--- modules/comment.module	(revision 5735)
+++ modules/comment.module	(working copy)
@@ -100,10 +100,11 @@
   $items = array();
 
   if ($may_cache) {
-    $access = user_access('administer comments');
+    $access = user_access('edit or delete comments') || user_access('administer comments');
     $items[] = array('path' => 'admin/comment', 'title' => t('comments'),
       'callback' => 'comment_admin_overview', 'access' => $access);
 
+    $access = user_access('administer comments');
     // Tabs:
     $items[] = array('path' => 'admin/comment/list', 'title' => t('list'),
       'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10);
@@ -149,7 +150,7 @@
  * Implementation of hook_perm().
  */
 function comment_perm() {
-  return array('access comments', 'post comments', 'administer comments', 'post comments without approval');
+  return array('access comments', 'post comments', 'administer comments', 'edit or delete comments', 'post comments without approval');
 }
 
 /**
@@ -236,7 +257,7 @@
     if ($form['type']['#value'] .'_node_settings' == $form_id) {
       $form['workflow']['comment_'. $form['type']['#value']] = array('#type' => 'radios', '#title' => t('Default comment setting'), '#default_value' => variable_get('comment_'. $form['type']['#value'], COMMENT_NODE_READ_WRITE), '#options' => array(t('Disabled'), t('Read only'), t('Read/Write')), '#description' => t('Users with the <em>administer comments</em> permission will be able to override this setting.'));
     }
-    if ($form['type']['#value'] .'_node_form' == $form_id && user_access('administer comments')) {
+    if ($form['type']['#value'] .'_node_form' == $form_id && (user_access('edit or delete comments') || user_access('administer comments'))) {
       $node = $form['#node'];
       $selected = isset($node->comment) ? $node->comment : variable_get("comment_$node->type", COMMENT_NODE_READ_WRITE);
       $form['user_comments'] = array(
@@ -267,7 +288,7 @@
     case 'load':
       return db_fetch_array(db_query("SELECT last_comment_timestamp, last_comment_name, comment_count FROM {node_comment_statistics} WHERE nid = %d", $node->nid));
     case 'validate':
-      if (!user_access('administer comments')) {
+      if (!user_access('edit or delete comments') || !user_access('administer comments')) {
         // Force default for normal users:
         $node->comment = variable_get("comment_$node->type", COMMENT_NODE_READ_WRITE);
       }
@@ -428,7 +460,7 @@
   global $user;
 
   if ($op == 'edit') {
-    return ($user->uid && $user->uid == $comment->uid && comment_num_replies($comment->cid) == 0) || user_access('administer comments');
+    return ($user->uid && $user->uid == $comment->uid && comment_num_replies($comment->cid) == 0) || user_access('edit or delete comments') || user_access('administer comments');
   }
 }
 
@@ -510,7 +542,7 @@
   comment_invoke_comment($edit, 'validate');
 
   // only admins can change these fields
-  if (!user_access('administer comments')) {
+  if (!user_access('edit or delete comments') || !user_access('administer comments')) {
     $edit['uid'] = $user->uid;
     $edit['timestamp'] = time();
     $edit['status'] = user_access('post comments without approval') ? 0 : 1;
@@ -765,6 +796,6 @@
   }
 
   if (node_comment_mode($comment->nid) == COMMENT_NODE_READ_WRITE) {
-    if (user_access('administer comments') && user_access('access administration pages')) {
+    if (user_access('edit or delete comments') || (user_access('administer comments') && user_access('access administration pages'))) {
       $links[] = l(t('delete'), "comment/delete/$comment->cid");
       $links[] = l(t('edit'), "comment/edit/$comment->cid");
