Commit 71ed95d2421330489574bbebc92cd7488edf216a

Authored by Joenio Costa
1 parent 619223c6

Do not check captcha answer for comments of logged users

(ActionItem2075)
app/controllers/public/content_viewer_controller.rb
@@ -119,7 +119,7 @@ class ContentViewerController < ApplicationController @@ -119,7 +119,7 @@ class ContentViewerController < ApplicationController
119 def add_comment 119 def add_comment
120 @comment.author = user if logged_in? 120 @comment.author = user if logged_in?
121 @comment.article = @page 121 @comment.article = @page
122 - if (@comment.reply_of_id || verify_recaptcha(:model => @comment, :message => _('Please type the words correctly'))) && @comment.save 122 + if (logged_in? || @comment.reply_of_id || verify_recaptcha(:model => @comment, :message => _('Please type the words correctly'))) && @comment.save
123 @page.touch 123 @page.touch
124 @comment = nil # clear the comment form 124 @comment = nil # clear the comment form
125 redirect_to :action => 'view_page', :profile => params[:profile], :page => @page.explode_path, :view => params[:view] 125 redirect_to :action => 'view_page', :profile => params[:profile], :page => @page.explode_path, :view => params[:view]