From e7df346c928b9812839391a0a3bc6ffd8cca20d0 Mon Sep 17 00:00:00 2001 From: Boris Gorbylev Date: Mon, 13 Jan 2020 15:03:44 +0300 Subject: [PATCH 1/5] Fixed None protocol --- lib/redmine_two_fa/protocols/none.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/redmine_two_fa/protocols/none.rb b/lib/redmine_two_fa/protocols/none.rb index 1274f60..7240981 100644 --- a/lib/redmine_two_fa/protocols/none.rb +++ b/lib/redmine_two_fa/protocols/none.rb @@ -3,5 +3,9 @@ class None < BaseProtocol def bypass? true end + + def initial_partial + 'account/init_2fa/none' + end end end From 97f9f820187226bc5c79ccfc0a7e46965998627d Mon Sep 17 00:00:00 2001 From: Boris Gorbylev Date: Mon, 13 Jan 2020 15:27:22 +0300 Subject: [PATCH 2/5] Fixed conflict with redmineup/a_common_lib --- lib/redmine_two_fa/patches/application_controller_patch.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/redmine_two_fa/patches/application_controller_patch.rb b/lib/redmine_two_fa/patches/application_controller_patch.rb index f673fdf..ffd9cd7 100644 --- a/lib/redmine_two_fa/patches/application_controller_patch.rb +++ b/lib/redmine_two_fa/patches/application_controller_patch.rb @@ -7,4 +7,6 @@ def find_current_user end end -ApplicationController.prepend(TwoFaApplicationControllerPatch) +Rails.configuration.to_prepare do + ApplicationController.prepend(TwoFaApplicationControllerPatch) +end From 752536cf578d25e1f6fd5fd10df6ad270da1ea01 Mon Sep 17 00:00:00 2001 From: Vladislav Yashin Date: Mon, 20 Jan 2020 11:46:06 +0400 Subject: [PATCH 3/5] Fix runtime error --- lib/redmine_two_fa/protocols/google_auth.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/redmine_two_fa/protocols/google_auth.rb b/lib/redmine_two_fa/protocols/google_auth.rb index 10110df..5996a53 100644 --- a/lib/redmine_two_fa/protocols/google_auth.rb +++ b/lib/redmine_two_fa/protocols/google_auth.rb @@ -3,7 +3,7 @@ class GoogleAuth < BaseProtocol def generate_qr(user) qr_size ||= 10 RQRCode::QRCode.new(user.provisioning_uri("#{user.login}", issuer: "#{Setting.host_name}"), size: qr_size, level: :h) - rescue RQRCode::QRCodeRunTimeError => e + rescue RQRCodeCore::QRCodeRunTimeError=> e retry unless (qr_size += 1) > 20 raise e end From 0366cf72e4a881c6fc090c077f3c9dc542742566 Mon Sep 17 00:00:00 2001 From: Vladislav Yashin Date: Mon, 20 Jan 2020 11:52:25 +0400 Subject: [PATCH 4/5] Remove ruby 2.7.0 from build matrix As it's not supported by latest Redmine --- .travis.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 08901f4..f4e4330 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ language: ruby rvm: - 2.4.9 - 2.6.5 - - 2.7.0 addons: postgresql: "9.4" @@ -11,11 +10,6 @@ env: - REDMINE_VER=3.4-stable - REDMINE_VER=4.1-stable -matrix: - exclude: - - rvm: 2.7.0 - env: REDMINE_VER=3.4-stable - install: "echo skip bundle install" before_script: From 2115b188ce470c49612b817210f4e02fd21ae0e7 Mon Sep 17 00:00:00 2001 From: Vladislav Yashin Date: Tue, 28 Jan 2020 13:43:58 +0400 Subject: [PATCH 5/5] Bump version [skip ci] --- CHANGELOG.md | 7 +++++++ init.rb | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5aed2bf..aecc9f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# 1.7.3 + +* Fix None protocol +* Fix conflict with redmineup/a_common_lib +* Fix runtime error +* Remove ruby 2.7.0 from build matrix + # 1.7.2 * Add API restriction option diff --git a/init.rb b/init.rb index 956cd05..d745455 100644 --- a/init.rb +++ b/init.rb @@ -17,7 +17,7 @@ Redmine::Plugin.register :redmine_2fa do name 'Redmine 2FA' - version '1.7.2' + version '1.7.3' url 'https://github.com/southbridgeio/redmine_2fa' description 'Two-factor authorization for Redmine' author 'Southbridge'