opf/openproject

View on GitHub
modules/two_factor_authentication/lib/open_project/two_factor_authentication/patches/user_patch.rb

Summary

Maintainability
A
0 mins
Test Coverage
module OpenProject::TwoFactorAuthentication::Patches
  module UserPatch
    def self.included(base)
      base.class_eval do
        has_many :otp_tokens, class_name: "TwoFactorAuthentication::LoginToken", dependent: :destroy
        has_many :otp_devices, class_name: "TwoFactorAuthentication::Device", dependent: :destroy
        has_many :otp_backup_codes, class_name: "TwoFactorAuthentication::BackupCode", dependent: :destroy
      end
    end
  end
end