Commit 50a2a229 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets Committed by Robert Speicher

Fix rubocop complain

parent cde474a4
...@@ -11,7 +11,6 @@ class Profiles::TwoFactorAuthsController < ApplicationController ...@@ -11,7 +11,6 @@ class Profiles::TwoFactorAuthsController < ApplicationController
def create def create
if current_user.valid_otp?(params[:pin_code]) if current_user.valid_otp?(params[:pin_code])
current_user.otp_required_for_login = true current_user.otp_required_for_login = true
#current_user.otp_secret = User.generate_otp_secret
current_user.save! current_user.save!
redirect_to profile_account_path redirect_to profile_account_path
......
...@@ -58,7 +58,7 @@ require 'file_size_validator' ...@@ -58,7 +58,7 @@ require 'file_size_validator'
class User < ActiveRecord::Base class User < ActiveRecord::Base
devise :two_factor_authenticatable, devise :two_factor_authenticatable,
:otp_secret_encryption_key => File.read(Rails.root.join('.secret')).chomp otp_secret_encryption_key: File.read(Rails.root.join('.secret')).chomp
include Sortable include Sortable
include Gitlab::ConfigHelper include Gitlab::ConfigHelper
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# four configuration values can also be set straight in your models. # four configuration values can also be set straight in your models.
Devise.setup do |config| Devise.setup do |config|
config.warden do |manager| config.warden do |manager|
manager.default_strategies(:scope => :user).unshift :two_factor_authenticatable manager.default_strategies(scope: :user).unshift :two_factor_authenticatable
end end
# ==> Mailer Configuration # ==> Mailer Configuration
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment