Skip to content

Commit

Permalink
Merge pull request #88 from southbridgeio/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
vladislav-yashin authored Jan 28, 2020
2 parents f853dde + 5d9cb58 commit 910e654
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
6 changes: 0 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ language: ruby
rvm:
- 2.4.9
- 2.6.5
- 2.7.0

addons:
postgresql: "9.4"
Expand All @@ -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:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 3 additions & 1 deletion lib/redmine_two_fa/patches/application_controller_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ def find_current_user
end
end

ApplicationController.prepend(TwoFaApplicationControllerPatch)
Rails.configuration.to_prepare do
ApplicationController.prepend(TwoFaApplicationControllerPatch)
end
2 changes: 1 addition & 1 deletion lib/redmine_two_fa/protocols/google_auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions lib/redmine_two_fa/protocols/none.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@ class None < BaseProtocol
def bypass?
true
end

def initial_partial
'account/init_2fa/none'
end
end
end

0 comments on commit 910e654

Please sign in to comment.