Updated base_test

This commit is contained in:
Sergei Tsoganov 2023-07-10 14:40:18 +03:00
parent 52405e1796
commit fe6015491c
7 changed files with 59 additions and 15 deletions

View file

@ -200,6 +200,12 @@ class Registrar < ApplicationRecord # rubocop:disable Metrics/ClassLength
white_ips.api.include_ip?(ip)
end
def registrar_ip_white?(ip)
return true unless Setting.registrar_ip_whitelist_enabled
white_ips.registrar_area.include_ip?(ip)
end
def accredited?
api_users.any? do |a|
return true unless a.accreditation_date.nil?