Purge IP addresses from comments after a configurable number of days

Description

When a user or visitor posts (but not when they edit) a comment, their IP address is logged for spam and abuse prevention. The IP address is stored in the database and visible to admins on the comment.

We would like a Scheduler task that will run daily and set the IP addresses on comments posted more than 30 days ago to nil. The number should be configurable; 30 is only an example.

It will be purging a lot of data the first time it runs – the initial clean-up may warrant a different approach than the daily task.

Testing

  1. Log in as a user and post a comment

  2. Log in as an admin and observe the IP address on the comment

  3. Have a database admin run the task

  4. Log in as an admin and make sure the work says "No address recorded"

Note that there is some caching on the comment sections that has caused difficulty with seeing IP addresses in the past, so it is probably best to check the comment itself by going to https://test.archiveofourown.org/comments/####

Assignee

Unassigned

Reporter

Sarken

Roadmap

Comments

Priority

High

Affects versions

Fix versions

None

Components

BackEnd

Difficulty

Medium

Required Access Level

Admin

Epic Link

Milestone

Internal 0.9