collectiveaccess / providence

Cataloguing and data/media management application
GNU General Public License v3.0
302 stars 169 forks source link

Allow searching/listing bans from caUtils #1646

Open goetzk opened 5 hours ago

goetzk commented 5 hours ago

caUtils provides a convenient way to remove all bans (clear-bans) but no way to list or query.

It would be great to have a list-bans which outputs all bans in the DB, ideally with an option to query for a specific IP/netblock.

eg listing bans (yes, these are example addresses)

./support/bin/caUtils list-bans
192.168.48.8
192.168.8.9
127.0.0.1
...

and querying a specific block (i imagine a single address would be the same but specified in full instead of wildcard)

./support/bin/caUtils list-bans --address='10.0.4.*'
10.0.4.74
10.0.4.122
10.0.4.229
10.0.4.8
goetzk commented 4 hours ago

I don't know if it would be easy or not, but it might be helpful if the date+time of banning (perhaps format '%FT%T') were included too.