-
Notifications
You must be signed in to change notification settings - Fork 20
Feat: Parental Consent Flow #172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ToxicBiohazard
wants to merge
12
commits into
hackthebox:main
Choose a base branch
from
ToxicBiohazard:parental-consent
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
73e0394
✨ Implement minor report and review system with associated database m…
ToxicBiohazard 6c81d2b
✨ Enhance minor verification system: add automatic removal of minor r…
ToxicBiohazard fa8d01e
💬 Improve code formatting across multiple files
ToxicBiohazard 79279e9
✨ Add comprehensive tests for minor report handling, verification hel…
ToxicBiohazard 489cca3
poetry run task test
ToxicBiohazard f6a35a0
🔧 Refactor test_flag_minor.py to update import paths for minor verifi…
ToxicBiohazard c993eee
✨ Add unit tests for ScheduledTasks cog, covering automatic removal o…
ToxicBiohazard d142f2e
✨ Add mock for Discord user ID retrieval in minor report view tests t…
ToxicBiohazard 80638f9
Merge remote-tracking branch 'upstream/main' into parental-consent
ToxicBiohazard 8f97bcb
feat: add foreign key constraint on minor_report.associated_ban_id an…
ToxicBiohazard f8e4f4f
feat: integrate Nexus API for parental consent verification
ToxicBiohazard 9573892
feat: add python-dateutil dependency and refactor date handling in sc…
ToxicBiohazard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
48 changes: 48 additions & 0 deletions
48
alembic/versions/82ea695d0a65_add_minor_report_and_minor_review_.py
This file contains hidden or 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,48 @@ | ||
| """add minor_report and minor_review_reviewer tables | ||
|
|
||
| Revision ID: 82ea695d0a65 | ||
| Revises: 4fc1c39216c9 | ||
| Create Date: 2026-02-16 12:31:57.651377 | ||
|
|
||
| """ | ||
| from alembic import op | ||
| import sqlalchemy as sa | ||
| from sqlalchemy.dialects import mysql | ||
|
|
||
| # revision identifiers, used by Alembic. | ||
| revision = '82ea695d0a65' | ||
| down_revision = '4fc1c39216c9' | ||
| branch_labels = None | ||
| depends_on = None | ||
|
|
||
|
|
||
| def upgrade() -> None: | ||
| op.create_table( | ||
| "minor_report", | ||
| sa.Column("id", sa.Integer(), nullable=False), | ||
| sa.Column("user_id", mysql.BIGINT(display_width=18), nullable=False), | ||
| sa.Column("reporter_id", mysql.BIGINT(display_width=18), nullable=False), | ||
| sa.Column("suspected_age", sa.Integer(), nullable=False), | ||
| sa.Column("evidence", mysql.TEXT(), nullable=False), | ||
| sa.Column("report_message_id", mysql.BIGINT(display_width=20), nullable=False), | ||
| sa.Column("status", mysql.VARCHAR(length=32), nullable=False, server_default="pending"), | ||
| sa.Column("reviewer_id", mysql.BIGINT(display_width=18), nullable=True), | ||
| sa.Column("created_at", mysql.TIMESTAMP(), nullable=False), | ||
| sa.Column("updated_at", mysql.TIMESTAMP(), nullable=False), | ||
| sa.Column("associated_ban_id", sa.Integer(), nullable=True), | ||
| sa.PrimaryKeyConstraint("id"), | ||
| ) | ||
| op.create_table( | ||
| "minor_review_reviewer", | ||
| sa.Column("id", sa.Integer(), nullable=False), | ||
| sa.Column("user_id", mysql.BIGINT(display_width=18), nullable=False), | ||
| sa.Column("added_by", mysql.BIGINT(display_width=18), nullable=True), | ||
| sa.Column("created_at", mysql.TIMESTAMP(), nullable=False), | ||
| sa.PrimaryKeyConstraint("id"), | ||
| sa.UniqueConstraint("user_id"), | ||
| ) | ||
|
|
||
|
|
||
| def downgrade() -> None: | ||
| op.drop_table("minor_review_reviewer") | ||
| op.drop_table("minor_report") | ||
This file contains hidden or 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
33 changes: 33 additions & 0 deletions
33
alembic/versions/c3f1a2b4d5e6_add_fk_minor_report_associated_ban_id.py
This file contains hidden or 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,33 @@ | ||
| """add FK constraint on minor_report.associated_ban_id | ||
|
|
||
| Revision ID: c3f1a2b4d5e6 | ||
| Revises: 82ea695d0a65 | ||
| Create Date: 2026-04-25 00:00:00.000000 | ||
|
|
||
| """ | ||
| from alembic import op | ||
|
|
||
| # revision identifiers, used by Alembic. | ||
| revision = 'c3f1a2b4d5e6' | ||
| down_revision = '82ea695d0a65' | ||
| branch_labels = None | ||
| depends_on = None | ||
|
|
||
|
|
||
| def upgrade() -> None: | ||
| op.create_foreign_key( | ||
| "fk_minor_report_associated_ban_id", | ||
| "minor_report", | ||
| "ban", | ||
| ["associated_ban_id"], | ||
| ["id"], | ||
| ondelete="SET NULL", | ||
| ) | ||
|
|
||
|
|
||
| def downgrade() -> None: | ||
| op.drop_constraint( | ||
| "fk_minor_report_associated_ban_id", | ||
| "minor_report", | ||
| type_="foreignkey", | ||
| ) |
This file contains hidden or 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 hidden or 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 hidden or 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.
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.
Uh oh!
There was an error while loading. Please reload this page.