diff --git a/app/models/ip_address.rb b/app/models/ip_address.rb index 7506f5a54..6d7c351ad 100644 --- a/app/models/ip_address.rb +++ b/app/models/ip_address.rb @@ -8,7 +8,7 @@ class IpAddress < ApplicationRecord end def self.visible(user) - CurrentUser.is_admin? ? all : where.not(model_type: "Dmail") + user.is_admin? ? all : where.not(model_type: "Dmail") end def self.search(params)