* Allow adding, viewing information about and deleting soft-blocks in the admin
Like other blocklist operations, it goes through a BlocklistSubmission, which
gains a new "block_type" field to determine what kind of block to apply for
this particular submission.
Note: If a version is already soft-blocked or hard-blocked, that version won't
be selectable when creating a new BlocklistSubmission, even of another type.
Future actions will be added to soften or harden blocks.
* add canned reasons to blocksubmission admin
* build on ReviewActionReason for canned response instead
* Fix reviewers tests that didn't create a complete ReviewActionReason
* in migration default canned_block_reason field to '' for existing records
* change version checkboxes to make it clearer between blocking and already blocked
* wrap blocked and not blocked icon & version string in a span, with title
* track Blocked versions per version
* update api docs
* test fixes
* scanners test fixes
* drop now obsolete create_blockversions command
* address review comments; fix failing tests
* restore warning messages about a version being in a submission or block
* add extra tests + optimizations
* Fix failing blocklist/test_serializers.py test
* Use IPLog only for IP searches in the admin
Using IPLog only makes the query a lot more efficient, previously the
multiple joins + OR were forcing MySQL to do a full table scan.
In addition:
- Leverage ip_address_binary (and most importantly, for faster searches (and in
the future, ranges)
- Use GROUP_CONCAT() to find and display all other IPs for each user in results
- Refactor existing frontend code to dynamically add/remove IPs from results
to use the new layout
- Review link is now on the channel column, always repeated
- Guid is now back to being a separate column
- Name and guid duplicates are now always eliminated
- Download link column has been added
* Group scanner query results by add-on and channel
The way django generates the changelist makes it a bit tricky to
customize, so we run some javascript once the dom is loaded to tweak
the rowspans, remove duplicate cells and add relevant css classnames.
* Initialize variable correctly
* Add missing const/use strict
* Revised to replace image with uploaded hero images
* Adjusted stylesheet - preview of hero image
* Delete image from PrimaryHero - did not run makemigrations yet
* Revised additional tests
* Adjusted line lengths - flake8
* Revised to include latest updates
* Delete image from PrimaryHero
* Display matching filenames & authors in scanner query results changelist
Also stop displaying action buttons, we don't want them in the query results
at this time.
* make Block.updated_by required at the model level
* use BlockSubmission add_view for single guids too
* renamed variables and added comments to _get_version_choices
* Add signoff to multi-block submissions
* MultiBlockSubmit to BlockSubmission
* add signoff approval and rejection
* Add logging for BlockSubmission (with admin.LogEntry)
* show full metadata for blocks being proposed
* squash django migrations
* only show LogEntry for that model instance on the page
* Add some comments to the permission checks in BlockSubmission
* .trim() all guid lines everywhere
We were already referencing a thumbnail, the same used on reviewer
tools, but we didn't have the styles in place for that so it was
a little too prominent.
* Add all fields/info needed in abuse admin detail page
* Set readonly_fields explicitly in the admin without using editable=False
DRF uses editable=False, and we definitely want those fields to be
writeable in the API.
* Add comment explaining use of Paginator()