Implement torrent nuking ability for mods (#377)

* Implement torrent nuking ability for mods

This deletes all torrents of a specific user.
A current caveat is that it will delete both sukebei and nyaa torrents,
but will only leave a log entry in the current flavour's log.

Also did some bootstrap untangling on the user view page.

* Per-flavour logging

Hopefully this works. Maybe.

* Tracker API: chunk into 100-element sublists

* isort

* Restrict nuking to superadmins

Also do a lint.sh.
This commit is contained in:
Nicolas F
2017-10-17 03:17:12 +02:00
committed by Arylide
parent de1fd2f1bc
commit 4019343d50
4 changed files with 120 additions and 51 deletions

View File

@@ -265,6 +265,7 @@ class DeleteForm(FlaskForm):
class BanForm(FlaskForm):
ban_user = SubmitField("Delete & Ban and Ban User")
ban_userip = SubmitField("Delete & Ban and Ban User+IP")
nuke = SubmitField("Delete & Ban all torrents")
unban = SubmitField("Unban")
_validator = DataRequired()