public function DeleteComment($CommentID = '', $TransientKey = '') {
      $Session = Gdn::Session();
      $DefaultTarget = '/discussions/';
      $ValidCommentID = is_numeric($CommentID) && $CommentID > 0;
      $ValidUser = $Session->UserID > 0 && $Session->ValidateTransientKey($TransientKey);
      
      if ($ValidCommentID && $ValidUser) {
         // Get comment and discussion data
         $Comment = $this->CommentModel->GetID($CommentID);
         $DiscussionID = GetValue('DiscussionID', $Comment);
         $Discussion = $this->DiscussionModel->GetID($DiscussionID);
         
         if ($Comment && $Discussion) {
            $DefaultTarget = DiscussionUrl($Discussion);
            
            // Make sure comment is this user's or they have Delete permission
            if ($Comment->InsertUserID != $Session->UserID)
               $this->Permission('Vanilla.Comments.Delete', TRUE, 'Category', $Discussion->PermissionCategoryID);
               
            // Make sure that content can (still) be edited
            $EditContentTimeout = C('Garden.EditContentTimeout', -1);
            $CanEdit = $EditContentTimeout == -1 || strtotime($Comment->DateInserted) + $EditContentTimeout > time();
            if (!$CanEdit)
               $this->Permission('Vanilla.Comments.Delete', TRUE, 'Category', $Discussion->PermissionCategoryID);
            
            // Delete the comment
            if (!$this->CommentModel->Delete($CommentID))
               $this->Form->AddError('Failed to delete comment');
         }
         else {
            $this->Form->AddError('Invalid comment');
         }
      } else {
         $this->Form->AddError('ErrPermission');
      }
      
      // Redirect
      if ($this->_DeliveryType == DELIVERY_TYPE_ALL) {
         $Target = GetIncomingValue('Target', $DefaultTarget);
         Redirect($Target);
      }
         
      if ($this->Form->ErrorCount() > 0) {
         $this->SetJson('ErrorMessage', $this->Form->Errors());
      } else {
         $this->JsonTarget("#Comment_$CommentID", '', 'SlideUp');
      }
         
      $this->Render();         
   }