Граф коммитов

51 Коммитов

Автор SHA1 Сообщение Дата
Mathieu Pillard 2a1eb8b1c5
Add ability to harden / soften blocks in the admin (#22827)
* Add ability to harden / soften blocks in the admin
* Use extended-choices for BlocklistSubmission ACTIONS and SIGNOFF_STATES
2024-11-13 10:55:00 +01:00
Mathieu Pillard 97fe21c536
Allow adding, viewing information about and deleting soft-blocks in the admin (#22765)
* 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.
2024-10-29 18:49:20 +01:00
Andrew Williamson 11cf428802
add canned reasons to blocksubmission admin (#20978)
* 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
2023-07-13 13:55:46 +01:00
Andrew Williamson 8fce06e757
define if a blocklistsubmission updaates metadata (#20907) 2023-06-30 14:56:03 +01:00
Andrew Williamson 5d8ed69812
update hero admin page styles (#20900) 2023-06-29 15:26:21 +01:00
Andrew Williamson 2f895832ea
change version checkboxes to make it clearer between blocking and already blocked (#20887)
* 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
2023-06-28 15:45:39 +01:00
Andrew Williamson 706798d37e
per version blocks (#20829)
* 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
2023-06-26 11:00:10 +01:00
Andrew Williamson 50867428c6
fix css in django admin (django4.2 changes) (#20657) 2023-05-09 13:28:37 +01:00
Mathieu Pillard 6e4947e581
Add flag to delay auto-approval for unlisted, set it at version creation (#20267)
* Add flag to delay auto-approval for unlisted, set it at version creation
2023-01-31 11:16:45 +01:00
Mathieu Pillard 59beb0efc2
Add IP search for addons & ratings admin (#20101)
* Add IP search for addons & ratings admin
2023-01-11 12:06:25 +01:00
Mathieu Pillard de9bad03f0
Refactor IP address search to make it available to other admin tools (#20141) 2023-01-05 15:37:30 +01:00
Mathieu Pillard e9843c2709
Support ranges and networks in IP admin search (#19674)
* Support ranges and networks in IP admin search
2022-09-12 11:11:44 +02:00
Mathieu Pillard 62aa2c48c9
Use IPLog only for IP searches in the admin (#19626)
* 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
2022-08-30 18:16:41 +02:00
Mathieu Pillard 2a5762e90f
Allow excluding more than one rule on scannerresult admin page (#17918) 2021-09-20 10:26:59 +02:00
Mathieu Pillard 5d6826ee8d
Add searching by ip address in user admin (#17505)
* Add searching by ip address in user admin

Also add more sources of IPs in known IP addresses field

* Address review comments
2021-07-20 16:35:29 +02:00
Mathieu Pillard bce0352903
Expose authors (and their role, included deleted) in add-on admin list (#16133)
* Expose authors (and their role, included deleted) in add-on admin list
2020-12-10 17:56:33 +01:00
Andrew Williamson 1f4f175d5e
Adjust the hero API to serve uploaded PrimaryHeroImage (#15712) 2020-10-14 09:33:33 +01:00
Mathieu Pillard 7b88a41117
Further tweak to code search results display (#15629)
- 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
2020-10-02 17:52:15 +02:00
Mathieu Pillard c5a7153c4b
Group scanner query results by add-on and channel (#15576)
* 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
2020-09-29 18:01:47 +02:00
Andrew Williamson 76f3516b02
Revert "RE: Adjust the hero API code to deliver uploaded images (#15080)" (#15199)
This (partly) commit 84c45610be (migration isn't).
2020-08-06 10:16:27 +01:00
Lisa Chan 84c45610be
RE: Adjust the hero API code to deliver uploaded images (#15080)
* 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
2020-08-04 12:41:46 -04:00
Lisa Chan b8a8eded12
Revert commits (#15079) 2020-07-27 16:18:47 -04:00
xlisachan 41fd60d968 Adjusted stylesheet for preview of primary hero images 2020-07-27 11:32:47 -04:00
xlisachan 6a033c0a1a Lint issues 2020-06-23 16:34:08 -04:00
xlisachan acabcb6116 Added new line at the end of file 2020-06-18 10:29:01 -04:00
xlisachan 57ee4022cb Revised stylesheet for select_image property (including no-image) and in PrimaryHeroImageAdmin 2020-06-16 21:21:56 -04:00
junngo cadfc2714d The images for the primary hero items are aligned 2020-05-05 17:15:51 +09:00
Andrew Williamson a67d57f42c
rename BlockSubmission to BlockListSubmission (#13766)
* rename BlockSubmission to BLSubmission

* rename all the things again- BLSubmission to BlocklistSubmission
2020-03-19 17:10:14 +00:00
Mathieu Pillard ff746893f9
Hide buttons if no permission in scanner query rule change list/form (#13761)
* Hide buttons if no permission in scanner query rule change list/form
2020-03-18 13:36:27 +01:00
William Durand 2d95f563b1
Add link to view all the add-ons of authors (scanner results) (#13736) 2020-03-17 20:12:03 +01:00
William Durand d07c254ecd
Update list of scanner results UI (#13719) 2020-03-13 11:31:59 +01:00
Mathieu Pillard 4ad2b97920
Display matching filenames & authors in scanner query results changelist (#13549)
* 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.
2020-02-21 18:51:42 +01:00
mirefly 4faa992833 Fix pagination style in admin addon files section 2020-02-13 15:40:31 -07:00
Andrew Williamson 26e162fd17
use BlockSubmission add_view for single guids too (#13342)
* 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
2020-02-03 12:14:07 +00:00
Andrew Williamson f393a9b4dc
blocklist dual sign off for multi-guid submission (#13266)
* 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
2020-01-16 17:43:25 +00:00
William Durand 20bc4fc439
Add report buttons in the change form too (#13080) 2019-12-10 18:05:26 +01:00
William Durand a372fe05e2
Call scanner admin actions with POST (#13011) 2019-12-03 11:27:55 +01:00
Andrew Williamson 056e7898ed
Multiple block create view (#12880) 2019-11-19 17:35:29 +00:00
William Durand ec6734d574
Fix feedback button style (#12883) 2019-11-15 14:46:08 +01:00
Andrew Williamson 38207e0595
edit addon block, with ActivityLog logging (#12816) 2019-11-07 15:09:38 +00:00
Andrew Williamson 4ecff133af
blocklist model base and admin add view (#12760) 2019-11-01 15:41:20 +00:00
Mathieu Pillard efca5c1c77 Display add-on previews as proper thumbnails in abuse report admin
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.
2019-09-03 13:54:49 +02:00
Andrew Williamson abb3dad00a
replace empty selection text with "no image selected" in hero admins (#12185) 2019-08-23 11:02:18 +01:00
Andrew Williamson 6cb40cfc05
restyle secondary hero admin radio buttons (#12114) 2019-08-15 13:34:13 +01:00
Andrew Williamson 2963e41224
add secondary hero modules (#12068)
* add secondary hero modules

* Rename 1114-add-secondary-hero-module.sql to 1115-add-secondary-hero-module.sql
2019-08-12 12:30:02 +01:00
Andrew Williamson dbb9d8cd49
Add admin support for adding/editing primary hero shelf items (#11949) 2019-07-29 17:16:09 +01:00
Mathieu Pillard b9e9c3d531
Add all fields/info needed in abuse admin detail page (#11543)
* 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()
2019-05-31 13:37:59 +02:00
Mathieu Pillard 6304aa18fe Display the locale next to the translation in discovery items admin preview 2018-07-10 13:00:27 +02:00
Mathieu Pillard 9a9031869e Show preview of the content in disco pane recommendations admin tool 2018-07-09 23:52:49 +02:00
Mathieu Pillard 486f169a2b Add admin tool to enter custom heading/description for disco pane recommendations 2018-07-05 14:41:16 +02:00