Uses invisible_captcha's default "foo fast" action
This commit is contained in:
@@ -114,8 +114,4 @@ class ApplicationController < ActionController::Base
|
|||||||
store_location_for(:user, request.path)
|
store_location_for(:user, request.path)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def redirect_timestamp_spam
|
|
||||||
redirect_to root_path, notice: InvisibleCaptcha.timestamp_error_message
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class DebatesController < ApplicationController
|
|||||||
|
|
||||||
feature_flag :debates
|
feature_flag :debates
|
||||||
|
|
||||||
invisible_captcha only: [:create, :update], honeypot: :subtitle, on_timestamp_spam: :redirect_timestamp_spam
|
invisible_captcha only: [:create, :update], honeypot: :subtitle
|
||||||
|
|
||||||
has_orders %w{hot_score confidence_score created_at relevance}, only: :index
|
has_orders %w{hot_score confidence_score created_at relevance}, only: :index
|
||||||
has_orders %w{most_voted newest oldest}, only: :show
|
has_orders %w{most_voted newest oldest}, only: :show
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class Organizations::RegistrationsController < Devise::RegistrationsController
|
class Organizations::RegistrationsController < Devise::RegistrationsController
|
||||||
|
|
||||||
invisible_captcha only: [:create], honeypot: :address, scope: :user, on_timestamp_spam: :redirect_timestamp_spam
|
invisible_captcha only: [:create], honeypot: :address, scope: :user
|
||||||
|
|
||||||
def new
|
def new
|
||||||
super do |user|
|
super do |user|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class ProposalsController < ApplicationController
|
|||||||
before_action :load_geozones, only: [:edit, :map, :summary]
|
before_action :load_geozones, only: [:edit, :map, :summary]
|
||||||
before_action :authenticate_user!, except: [:index, :show, :map, :summary]
|
before_action :authenticate_user!, except: [:index, :show, :map, :summary]
|
||||||
|
|
||||||
invisible_captcha only: [:create, :update], honeypot: :subtitle, on_timestamp_spam: :redirect_timestamp_spam
|
invisible_captcha only: [:create, :update], honeypot: :subtitle
|
||||||
|
|
||||||
has_orders %w{hot_score confidence_score created_at relevance}, only: :index
|
has_orders %w{hot_score confidence_score created_at relevance}, only: :index
|
||||||
has_orders %w{most_voted newest oldest}, only: :show
|
has_orders %w{most_voted newest oldest}, only: :show
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ class SpendingProposalsController < ApplicationController
|
|||||||
|
|
||||||
feature_flag :spending_proposals
|
feature_flag :spending_proposals
|
||||||
|
|
||||||
invisible_captcha only: [:create, :update], honeypot: :subtitle, on_timestamp_spam: :redirect_timestamp_spam
|
invisible_captcha only: [:create, :update], honeypot: :subtitle
|
||||||
|
|
||||||
respond_to :html, :js
|
respond_to :html, :js
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
class Users::RegistrationsController < Devise::RegistrationsController
|
class Users::RegistrationsController < Devise::RegistrationsController
|
||||||
prepend_before_action :authenticate_scope!, only: [:edit, :update, :destroy, :finish_signup, :do_finish_signup]
|
prepend_before_action :authenticate_scope!, only: [:edit, :update, :destroy, :finish_signup, :do_finish_signup]
|
||||||
|
|
||||||
invisible_captcha only: [:create], honeypot: :family_name, scope: :user, on_timestamp_spam: :redirect_timestamp_spam
|
invisible_captcha only: [:create], honeypot: :family_name, scope: :user
|
||||||
|
|
||||||
def new
|
def new
|
||||||
super do |user|
|
super do |user|
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ feature 'Debates' do
|
|||||||
|
|
||||||
expect(page).to have_content 'Sorry, that was too quick! Please resubmit'
|
expect(page).to have_content 'Sorry, that was too quick! Please resubmit'
|
||||||
|
|
||||||
expect(current_path).to eq(proposals_path)
|
expect(current_path).to eq(new_debate_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'Errors on create' do
|
scenario 'Errors on create' do
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ feature 'Organizations' do
|
|||||||
|
|
||||||
expect(page).to have_content 'Sorry, that was too quick! Please resubmit'
|
expect(page).to have_content 'Sorry, that was too quick! Please resubmit'
|
||||||
|
|
||||||
expect(current_path).to eq(root_path)
|
expect(current_path).to eq(new_organization_registration_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'Errors on create' do
|
scenario 'Errors on create' do
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ feature 'Proposals' do
|
|||||||
|
|
||||||
expect(page).to have_content 'Sorry, that was too quick! Please resubmit'
|
expect(page).to have_content 'Sorry, that was too quick! Please resubmit'
|
||||||
|
|
||||||
expect(current_path).to eq(proposals_path)
|
expect(current_path).to eq(new_proposal_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'Responsible name is stored for anonymous users' do
|
scenario 'Responsible name is stored for anonymous users' do
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ feature 'Registration form' do
|
|||||||
|
|
||||||
expect(page).to have_content 'Sorry, that was too quick! Please resubmit'
|
expect(page).to have_content 'Sorry, that was too quick! Please resubmit'
|
||||||
|
|
||||||
expect(current_path).to eq(root_path)
|
expect(current_path).to eq(new_user_registration_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ feature 'Spending proposals' do
|
|||||||
click_button 'Create'
|
click_button 'Create'
|
||||||
|
|
||||||
expect(page).to have_content 'Sorry, that was too quick! Please resubmit'
|
expect(page).to have_content 'Sorry, that was too quick! Please resubmit'
|
||||||
expect(current_path).to eq(proposals_path)
|
expect(current_path).to eq(new_spending_proposal_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'Create notice' do
|
scenario 'Create notice' do
|
||||||
|
|||||||
Reference in New Issue
Block a user