From de55dbeb3330a655a46733b3054fbc3b0f6030cf Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 4 Dec 2017 15:20:56 +0100 Subject: [PATCH] =?UTF-8?q?Fixed=20issue=20#1604=20-=20Webform=20isn=C2=B4?= =?UTF-8?q?t=20available=20|=20401=20Unauthorized.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/form_controller.rb | 2 +- test/controllers/form_controller_test.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/form_controller.rb b/app/controllers/form_controller.rb index 18ab83c70..bea472d77 100644 --- a/app/controllers/form_controller.rb +++ b/app/controllers/form_controller.rb @@ -238,7 +238,7 @@ class FormController < ApplicationController def enabled? return true if params[:test] && current_user && current_user.permissions?('admin.channel_formular') - return true if Setting.get('form_ticket_create') && Setting.get('customer_ticket_create') + return true if Setting.get('form_ticket_create') response_access_deny false end diff --git a/test/controllers/form_controller_test.rb b/test/controllers/form_controller_test.rb index 7c14edbd8..98ea10cee 100644 --- a/test/controllers/form_controller_test.rb +++ b/test/controllers/form_controller_test.rb @@ -245,8 +245,8 @@ class FormControllerTest < ActionDispatch::IntegrationTest end test '06 - customer_ticket_create false disables form' do - Setting.set('form_ticket_create', true) - Setting.set('customer_ticket_create', false) + Setting.set('form_ticket_create', false) + Setting.set('customer_ticket_create', true) fingerprint = SecureRandom.hex(40)