مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2026-01-17 05:33:35 +00:00
style(rubocop): Lint/IneffectiveAccessModifier
هذا الالتزام موجود في:
@@ -68,18 +68,22 @@ class IPPoolRule < ApplicationRecord
|
||||
errors.add :ip_pool_id, "must belong to the organization"
|
||||
end
|
||||
|
||||
def self.address_matches?(condition, address)
|
||||
address = Postal::Helpers.strip_name_from_address(address)
|
||||
if condition =~ /@/
|
||||
parts = address.split("@")
|
||||
domain = parts.pop
|
||||
uname = parts.join("@")
|
||||
uname, = uname.split("+", 2)
|
||||
condition == "#{uname}@#{domain}"
|
||||
else
|
||||
# Match as a domain
|
||||
condition == address.split("@").last
|
||||
class << self
|
||||
|
||||
def address_matches?(condition, address)
|
||||
address = Postal::Helpers.strip_name_from_address(address)
|
||||
if condition =~ /@/
|
||||
parts = address.split("@")
|
||||
domain = parts.pop
|
||||
uname = parts.join("@")
|
||||
uname, = uname.split("+", 2)
|
||||
condition == "#{uname}@#{domain}"
|
||||
else
|
||||
# Match as a domain
|
||||
condition == address.split("@").last
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم