From {T381052}, if we need to gate a variable behind a preference check, we should implement the functionality/feature to do so instead of hardcoding a generic preference (see {T380920}). `user_unnamed_ip` is already protected (filters using it are restricted to users w/the right to view/use protected variables) but requires the following additional restrictions:
- users should have agreed to the temp users preference/ToS
- users should have the `checkuser-temporary-account` right
These are variable/temp account specific and therefore probably shouldn't be implemented in the core AbuseFilter extension. We'll need a method/hook/config/etc to declare and apply these restrictions/checks.
Given how tied into temporary accounts `user_unnamed_ip` is, it may also be necessary to reconsider if the variable should remain a core-provided variable or if it should instead be a custom variable created by CheckUser.
Acceptance criteria:
- [ ] a method to add additional restrictions for variables exists in AbuseFilter
- [ ] `user_unnamed_ip` is restricted via this feature with the above restrictions
- [ ] `user_unnamed_ip` is declared by the appropriate extension