flags: remove uploader targeting restrictions.

Remove restrictions against flagging too many posts by the same
uploader. This had problems with preventing legitimate flags in some
cases, particularly with old legacy content. This will be policed
manually instead.
This commit is contained in:
evazion
2020-01-13 12:39:16 -06:00
parent 34c3df78d9
commit 0b08f38b8b
3 changed files with 0 additions and 71 deletions

View File

@@ -51,24 +51,6 @@ class PostFlagTest < ActiveSupport::TestCase
assert_equal(["have already flagged this post"], @post_flag.errors[:creator_id])
end
should "not be able to target a single uploader" do
travel_to(2.weeks.ago) do
as(@alice) do
@posts = FactoryBot.create_list(:post, 10, uploader: @alice)
end
end
as(@bob) do
travel_to(1.week.ago) do
@flags = @posts.map {|x| PostFlag.create(reason: "bad #{x.id}", post: x)}
end
@bad_flag = PostFlag.create(post: @post, reason: "bad #{@post.id}")
end
assert_equal(["You cannot flag posts uploaded by this user"], @bad_flag.errors.full_messages)
end
should "not be able to flag more than 10 posts in 24 hours" do
as(@bob) do
@post_flag = PostFlag.new(post: @post, reason: "aaa", is_resolved: false)