-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add ability to harden / soften blocks in the admin #22827
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diox
commented
Nov 6, 2024
diox
force-pushed
the
blockadmin-harden-soften-actions
branch
from
November 8, 2024 15:48
f7bca99
to
e97d832
Compare
diox
force-pushed
the
blockadmin-harden-soften-actions
branch
from
November 8, 2024 15:54
e97d832
to
ac544c6
Compare
eviljeff
approved these changes
Nov 12, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just nits
5 tasks
eviljeff
approved these changes
Nov 12, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 task
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: mozilla/addons#15084
Description
See title, this allows admins to harden or soften a block (either partially or completely).
Context
Like with the rest of the block operations, you're never directly modifying
Block
orBlockVersion
for this in the admin, instead you go through aBlocklistSubmission
with a specificaction
. This allows signoff and makes the UI consistent across the various blocklist-related features in the admin.Testing
There should be harden & soften buttons for a block. Once on the corresponding page, you should be able to select only the hard-blocked versions in that block for the soften action, and the opposite, soft-blocked versions for the harden action. Once you submit, the selected versions should have their block type changed according to the action performed.
The signoff mechanism is reused, untouched. So, if the change requires signoff (average daily users for the add-on is above configured threshold of
settings.DUAL_SIGNOFF_AVERAGE_DAILY_USERS_THRESHOLD
), the changes are pending approval, which is performed as normal in the same admin (in production it would be a different user, ifDEBUG
isTrue
we allow the same user)Checklist
#ISSUENUM
at the top of your PR to an existing open issue in the mozilla/addons repository.