Class: Fortifier::AuthSteps::CheckForBlockedIp
- Inherits:
-
Object
- Object
- Fortifier::AuthSteps::CheckForBlockedIp
- Defined in:
- app/models/fortifier/auth_steps/check_for_blocked_ip.rb
Class Method Summary collapse
Class Method Details
.invoke(params) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/models/fortifier/auth_steps/check_for_blocked_ip.rb', line 8 def self.invoke(params) auth_user = params[:auth_user] remote_addr = params[:remote_addr] account = params[:account] ip_blocked = AuthLog.block_ip?(remote_addr) if ip_blocked # TODO: (DK) ? auth_log.destroy # this is so one user can't block an IP NotifierMailer.account_ip_blocked(auth_user, remote_addr, account).deliver NotifierMailer.account_ip_blocked_providigm(auth_user, remote_addr, account).deliver end params.merge! auth_msg: ip_blocked ? Messaging::IP_BLOCKED : nil end |
.skip_step?(params) ⇒ Boolean
4 5 6 |
# File 'app/models/fortifier/auth_steps/check_for_blocked_ip.rb', line 4 def self.skip_step?(params) params[:auth_msg].present? end |