cirandas.net

commit ef1e0029108f81e939d5dbeb266c16a416eaf870

Author: Pedro Lucas Porcellis <porcellis@eletrotupi.com>

Disable captcha

This commit is part of a long awaiting commits on the production server

 app/controllers/public/account_controller.rb | 8 ++++----
 app/controllers/public/comment_controller.rb | 2 +-
 app/views/account/forgot_password.html.erb | 4 ++--


diff --git a/app/controllers/public/account_controller.rb b/app/controllers/public/account_controller.rb
index e637c3b5e7f19fb4241e5768a01e88f269c282b0..3e14136f0775a4a19aa6af07b98bac5a96e52971 100644
--- a/app/controllers/public/account_controller.rb
+++ b/app/controllers/public/account_controller.rb
@@ -194,10 +194,10 @@     @change_password = ChangePassword.new
 
     if request.post?
       begin
-        unless verify_recaptcha
-          @change_password.errors.add(:base, _('Please type the captcha text correctly'))
-          return false
-        end
+        #unless verify_recaptcha
+          #@change_password.errors.add(:base, _('Please type the captcha text correctly'))
+          #return false
+        #end
 
         requestors = fetch_requestors(params[:value])
         raise ActiveRecord::RecordNotFound if requestors.blank? || params[:value].blank?




diff --git a/app/controllers/public/comment_controller.rb b/app/controllers/public/comment_controller.rb
index d74483528ba250210ba82c09d27e3165baeacac8..d760532749f3edfcf9c67c404fa176284c7ceac4 100644
--- a/app/controllers/public/comment_controller.rb
+++ b/app/controllers/public/comment_controller.rb
@@ -21,7 +21,7 @@        end
       return
     end
 
-    unless @page.accept_comments?
+    unless @page.accept_comments? && current_user.present?
       respond_to do |format|
         format.js do
            render :json => { :msg => _('Comment not allowed in this article')}




diff --git a/app/views/account/forgot_password.html.erb b/app/views/account/forgot_password.html.erb
index 72332c187142a7fea770a2e05b142d4aaaf10042..41244db8cd744b9df5defd9a88925d90cf36a181 100644
--- a/app/views/account/forgot_password.html.erb
+++ b/app/views/account/forgot_password.html.erb
@@ -5,8 +5,8 @@
 <%= form_tag do %>
   <%= labelled_form_field fields_label, text_field_tag(:value) %>
 
-  <h3><%= _('Please type the captcha text below') %></h3>
-  <%= recaptcha_tags(:display => { :theme => 'clean' }, :ajax => true, :ssl => true) %>
+  <h3><%# _('Please type the captcha text below') %></h3>
+  <%# recaptcha_tags(:ajax => true, :ssl => true) %>
 
   <div>
     <%= button_bar do %>