-
Notifications
You must be signed in to change notification settings - Fork 537
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow adding, viewing information about and deleting soft-blocks in t…
…he 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.
- Loading branch information
Showing
14 changed files
with
355 additions
and
70 deletions.
There are no files selected for viewing
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
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
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
23 changes: 23 additions & 0 deletions
23
src/olympia/blocklist/migrations/0036_blocklistsubmission_block_type_and_more.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 4.2.16 on 2024-10-29 17:21 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('blocklist', '0035_alter_blockversion_soft'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='blocklistsubmission', | ||
name='block_type', | ||
field=models.IntegerField(choices=[(0, '🛑 Hard-Block'), (1, '⚠️ Soft-Block')], default=0), | ||
), | ||
migrations.AlterField( | ||
model_name='blockversion', | ||
name='soft', | ||
field=models.BooleanField(choices=[(0, '🛑 Hard-Blocked'), (1, '⚠️ Soft-Blocked')], default=False), | ||
), | ||
] |
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
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
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
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
Oops, something went wrong.