Page MenuHomePhabricator

Consider unifying temporary user IP lookup logic
Open, Needs TriagePublic

Description

As part of T349715 and related tasks to add temporary user support to the IPInfo extension, the TempUserIPLookup class was added to encapsulate querying relevant IP data for temporary users from data tables provided by the CheckUser extension. However, similar logic had already existed before in the CheckUser extension to fulfill similar needs.

We should investigate the possibilities of reusing the lookup class between the two extensions. This would likely entail moving it to the CheckUser extension and having IPInfo take a hard dependency on CheckUser, rather than having it as an optional dependency as it does now.

This task is pending refinement during an upcoming TSP engineering meeting.

Event Timeline

This would likely entail moving it to the CheckUser extension and having IPInfo take a hard dependency on CheckUser, rather than having it as an optional dependency as it does now.

This sounds good to me. Although we can't enforce it, it would be good to encourage the practice of keeping CheckUser table lookups in the CheckUser extension, since they need to be carefully permissions check and logged.