-
Notifications
You must be signed in to change notification settings - Fork 72
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
PROD-2700 Implement Soft Delete for PrivacyRequests #5321
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
0a7b7f1
Allow soft deleting privacy requests
erosselli 610a8d2
Add some validation to other endpoints
erosselli 7de71c5
static checks
erosselli 97f9c24
Add bulk soft delete endpoint
erosselli 6949046
static checks
erosselli f33e661
Add changelog entry
erosselli c3f7e6e
Fix migration
erosselli a00cf16
Remove FK, change methods to POST, change response type for bulk delete
erosselli 86295e2
Update down revision
erosselli 685ca07
Fix tests
erosselli bf1cc0e
Fix frontend types properly
erosselli 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 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
10 changes: 10 additions & 0 deletions
10
clients/admin-ui/src/types/api/models/BulkSoftDeletePrivacyRequests.ts
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,10 @@ | ||
/* istanbul ignore file */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
|
||
import type { BulkUpdateFailed } from "./BulkUpdateFailed"; | ||
|
||
export type BulkSoftDeletePrivacyRequests = { | ||
succeeded: Array<string>; | ||
failed: Array<BulkUpdateFailed>; | ||
}; |
22 changes: 22 additions & 0 deletions
22
clients/admin-ui/src/types/api/models/DynamicErasureEmailDocsSchema.ts
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,22 @@ | ||
/* istanbul ignore file */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
|
||
import type { AdvancedSettings } from "./AdvancedSettings"; | ||
import type { FidesDatasetReference } from "./FidesDatasetReference"; | ||
|
||
/** | ||
* DynamicErasureEmailDocsSchema Secrets Schema for API Docs | ||
*/ | ||
export type DynamicErasureEmailDocsSchema = { | ||
test_email_address?: string | null; | ||
advanced_settings?: AdvancedSettings; | ||
/** | ||
* Dataset reference to the field containing the third party vendor name. Both third_party_vendor_name and recipient_email_address must reference the same dataset and collection. | ||
*/ | ||
third_party_vendor_name: FidesDatasetReference; | ||
/** | ||
* Dataset reference to the field containing the recipient email address. Both third_party_vendor_name and recipient_email_address must reference the same dataset and collection. | ||
*/ | ||
recipient_email_address: FidesDatasetReference; | ||
}; |
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
33 changes: 33 additions & 0 deletions
33
...fides/api/alembic/migrations/versions/75bb9ee843f5_add_soft_delete_for_privacy_request.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,33 @@ | ||
"""Adds deleted_at and deleted_by to PrivacyRequest | ||
|
||
Revision ID: 75bb9ee843f5 | ||
Revises: 68c590ff6e89 | ||
Create Date: 2024-09-19 14:35:30.510909 | ||
|
||
""" | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "75bb9ee843f5" | ||
down_revision = "68c590ff6e89" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column( | ||
"privacyrequest", | ||
sa.Column("deleted_at", sa.DateTime(timezone=True), nullable=True), | ||
) | ||
op.add_column("privacyrequest", sa.Column("deleted_by", sa.String(), nullable=True)) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column("privacyrequest", "deleted_by") | ||
op.drop_column("privacyrequest", "deleted_at") | ||
# ### end Alembic commands ### |
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.
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.
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.
check before merging