From 92e4635af8e8cd005207f84b2115f7ed08e7a081 Mon Sep 17 00:00:00 2001 From: evazion Date: Sat, 21 Mar 2020 22:47:48 -0500 Subject: [PATCH] ip addresses: fix reference to CurrentUser inside `visible`. --- app/models/ip_address.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)