Remove the /ip_addresses page. This page allowed moderators to search users by IP, and to see recent activity tied to an IP. However, it was limited to IPs tied to uploads, comments, dmails, artist edits, note edits, and wiki edits. Remove this page because it was limited in scope and because there are better ways of doing what it did. The /user_events page is better at catching sockpuppets because it tracks IPs for every login, not just for certain types of edits. And the /user_actions page is better at monitoring user activity because it shows all activity associated with an account, not just for certain types of edits. Removing this allows us to drop IP addresses from all tables besides the user_events table. This is good because these IPs are no longer necessary for any purpose, and because storing them forever is a liability.
28 lines
719 B
Ruby
28 lines
719 B
Ruby
require 'test_helper'
|
|
|
|
class IpAddressesControllerTest < ActionDispatch::IntegrationTest
|
|
context "The IP addresses controller" do
|
|
setup do
|
|
@mod = create(:mod_user, last_ip_addr: "1.2.3.4")
|
|
@user = create(:user, last_ip_addr: "5.6.7.8")
|
|
end
|
|
|
|
context "show action" do
|
|
should "be visible to mods" do
|
|
get_auth ip_address_path("1.2.3.4"), @mod
|
|
assert_response :success
|
|
end
|
|
|
|
should "not be visible to members" do
|
|
get_auth ip_address_path("1.2.3.4"), @user
|
|
assert_response 403
|
|
end
|
|
|
|
should "work for a Tor address" do
|
|
get_auth ip_address_path("2405:8100:8000::1"), @mod
|
|
assert_response :success
|
|
end
|
|
end
|
|
end
|
|
end
|