app/models/automatic_ban.rb
# Minimum registration period is three months. Having short ban period
# that uses the same time should abusers from participating in the most
# immediate rounds of auctions for a domain name.
Minimum registration period is three months. Having short ban period
that uses the same time should abusers from participating in the most
immediate rounds of auctions for a domain name.
Minimum registration period is three months . Having short ban period that uses the same time should abusers from participating in the most immediate rounds of auctions for a domain name .
def assign_ban_length
    now = Time.zone.now.to_datetime
    if unpaid_invoices < Setting.ban_number_of_strikes
      @ban.update!(domain_name: domain_name, valid_from: now,
                   valid_until: now >> SHORT_BAN_PERIOD_IN_MONTHS)
    elsif unpaid_invoices >= Setting.ban_number_of_strikes
      @ban.update!(valid_until: now >> Setting.ban_length)
    end
  end
def assign_ban_length now = Time . zone . now . to_datetime if unpaid_invoices < Setting . ban_number_of_strikes @ban . update! ( domain_name : domain_name , valid_from : now , valid_until : now >> SHORT_BAN_PERIOD_IN_MONTHS ) elsif unpaid_invoices >= Setting . ban_number_of_strikes @ban . update! ( valid_until : now >> Setting . ban_length ) end end
Minimum registration period is three months.
Minimum registration period is three months .