backdrop-contrib / ip_blocking

Enables blocking of IP addresses.
GNU General Public License v2.0
0 stars 2 forks source link

Option to import D7 blocked_ips #17

Closed bugfolder closed 11 months ago

bugfolder commented 11 months ago

When installing this module on top of a site upgraded from D7 that has blocked IPs (in table blocked_ips), this module renames that table to blocked_ips_d7) and creates its own blocked_ips table, which has 3 additional columns: reason, uid, and time.

For people upgrading who have a lot of blocked IPs, they would likely like to keep those IPs blocked. So it would be nice if the blocked_ips_d7 table exists, to offer admins the option to move those IPs into blocked_ips, specifying the reason, uid, and time to use for all of them upon import. And then drop the blocked_ips_d7 table.

findlabnet commented 11 months ago

Thanks, seems to be a useful feature. So, for all of them on import: reason is "Imported during migration", uid is current user (who perform the migration) id, and time is import time. Seems OK for you?

bugfolder commented 11 months ago

So, for all of them on import: reason is "Imported during migration", uid is current user (who perform the migration) id, and time is import time. Seems OK for you?

That would probably be OK, but for maximum flexibility, maybe consider creating textfields that let the user set those values during the import, but specifying what you suggested as the default values.

And then also, since the table of blocked IPs could be quite large (on my site, there's over 70K blocked IPs), the import should be done as a batch job to prevent timeouts during the import.

findlabnet commented 11 months ago

Resolved in latest release.

I have found bug, so here one more release today.

findlabnet commented 11 months ago

Just to note how it was tested.

rec_80K