--- ajax_comments.module	18 Feb 2015 
+++ ajax_comments.module	16 Jun 2009 
@@ --43,4 ++43,4
	$items['ajax_comments/delete/%'] = array(
		'page callback' => 'ajax_comments_delete',
		'page arguments' => array(2),
	--'access arguments' => array('administer comments'),
	++ 'access arguments' => array('delete comments'),
		'delivery callback' => 'ajax_deliver',
		'type' => MENU_CALLBACK,
	  );

@@ -394,8 +394,10
function ajax_comments_comment_view($comment, $view_mode, $langcode) {
  if (ajax_comments_node_type_active(substr($comment->node_type, strlen('comment_node_')), $view_mode)) {
    // Reply.
    if (isset($comment->content['links']['comment']['#links']['comment-reply'])) {
      $comment->content['links']['comment']['#links']['comment-reply']['attributes']['class'] = array('use-ajax', 'ajax-comment-reply');
      $comment->content['links']['comment']['#links']['comment-reply']['attributes']['id'] = array('reply-' . $comment->cid);
      $comment->content['links']['comment']['#links']['comment-reply']['href'] = 'ajax_comments/reply/' . $comment->nid . '/' . $comment->cid;
    }
    // Edit.
    if (isset($comment->content['links']['comment']['#links']['comment-edit'])) {
      $comment->content['links']['comment']['#links']['comment-edit']['attributes']['class'] = array('use-ajax', 'ajax-comment-edit');
      $comment->content['links']['comment']['#links']['comment-edit']['href'] = 'ajax_comments/edit/' . $comment->cid;
    }
    // Delete.
    --if (isset($comment->content['links']['comment']['#links']['comment-delete'])) {
	++global $user;
    ++if (isset($comment->content['links']['comment']['#links']['comment-delete']) || ($comment->uid==$user->uid) ) {
	++$comment->content['links']['comment']['#links']['comment-delete']['title']=t('Delete');
      $comment->content['links']['comment']['#links']['comment-delete']['attributes']['class'] = array('use-ajax');
      $comment->content['links']['comment']['#links']['comment-delete']['href'] = 'ajax_comments/delete/' . $comment->cid;
    }
  }
}

/**
*Create new permission to remove comment 
*/
function ajax_comments_permission()
{
return array(
    'delete comments' => array(
      'title' => t('Delete own comments'),
      'description' => t('Perform administration tasks for my module.'),
    ),
  );
}
