Fix saved searces, news updates, ip bans being dumped to BigQuery.
Prevent saved searches, news updates, and ip bans from being publicly dumped to BigQuery. They didn't override the `visible` method to restrict their visibility for anonymous users.
This commit is contained in:
@@ -12,6 +12,14 @@ class IpBan < ApplicationRecord
|
||||
partial: 100
|
||||
}, _suffix: "ban"
|
||||
|
||||
def self.visible(user)
|
||||
if user.is_moderator?
|
||||
all
|
||||
else
|
||||
none
|
||||
end
|
||||
end
|
||||
|
||||
def self.ip_matches(ip_addr)
|
||||
where("ip_addr >>= ?", ip_addr)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user