ethyca-fides 2.58.2rc0__py2.py3-none-any.whl → 2.58.3b0__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ethyca_fides-2.58.2rc0.dist-info → ethyca_fides-2.58.3b0.dist-info}/METADATA +20 -11
- {ethyca_fides-2.58.2rc0.dist-info → ethyca_fides-2.58.3b0.dist-info}/RECORD +221 -211
- {ethyca_fides-2.58.2rc0.dist-info → ethyca_fides-2.58.3b0.dist-info}/WHEEL +1 -1
- {ethyca_fides-2.58.2rc0.dist-info → ethyca_fides-2.58.3b0.dist-info}/entry_points.txt +0 -1
- fides/_version.py +3 -3
- fides/api/alembic/migrations/versions/67d01c4e124e_add_reject_all_mechanism_to_privacy_.py +56 -0
- fides/api/alembic/migrations/versions/6e565c16dae1_add_tcf_publisher_restrictions.py +107 -0
- fides/api/alembic/migrations/versions/9288f729cac4_add_tcf_configuration_fk_to_experience_.py +62 -0
- fides/api/alembic/migrations/versions/99c603c1b8f9_add_password_login_enabled_and_totp_secret_to_fidesuser.py +45 -0
- fides/api/api/deps.py +8 -2
- fides/api/api/v1/endpoints/user_endpoints.py +8 -12
- fides/api/cryptography/identity_salt.py +12 -13
- fides/api/custom_types.py +6 -1
- fides/api/db/base.py +5 -0
- fides/api/db/system.py +1 -3
- fides/api/migrations/hash_migration_job.py +2 -2
- fides/api/models/attachment.py +80 -11
- fides/api/models/comment.py +45 -15
- fides/api/models/detection_discovery.py +31 -0
- fides/api/models/fides_user.py +26 -9
- fides/api/models/fides_user_invite.py +2 -0
- fides/api/models/privacy_experience.py +68 -0
- fides/api/models/privacy_request/privacy_request.py +23 -6
- fides/api/models/tcf_publisher_restrictions.py +465 -0
- fides/api/schemas/connection_configuration/connection_config.py +30 -16
- fides/api/schemas/user.py +5 -1
- fides/api/service/deps.py +9 -0
- fides/api/service/storage/s3.py +14 -1
- fides/api/task/graph_task.py +1 -1
- fides/api/util/collection_util.py +48 -9
- fides/cli/commands/pull.py +77 -13
- fides/core/api.py +2 -1
- fides/core/pull.py +38 -7
- fides/service/error_handling/__init__.py +0 -0
- fides/service/error_handling/error_handler.py +202 -0
- fides/service/user/__init__.py +0 -0
- fides/service/user/user_service.py +140 -0
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/chunks/1376-f2e68d1cfdacfd48.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/146-9567a3d2f9e21b83.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/1817-5c32a7592d18a859.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{2397-ee53235fb21b5e97.js → 2397-eae0fd1e90821f7e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3855-b6b7865dedd7bc2a.js → 3855-c02445526594fc1f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3872-4e053c20d546f027.js → 3872-0b61e674a790491b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/3938-ebc24cf8e57d7665.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{4060-8d165e1236ea521a.js → 4060-fd2f97afa5ba80d4.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/4121-28beb1c0ce3330b6.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4450-d354a1152f4747e2.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4481-865277e9623e6014.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{5258-0658dc2274df6832.js → 5258-506e9e524f8dd8c8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{5480-f49696df5e8ae500.js → 5480-ff3e05a015ee2799.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{5487-3ad50d21cdbc9209.js → 5487-f281d138cb89b5c9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/5973-28d2af853d8498d7.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6315-43837fe5ed5ecf5d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{6372-ca9c12ac8902365b.js → 6372-8479ec83d73af02b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6853-8941824350c3c1a8.js → 6853-3562089cc16a6799.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6954-3b887fb444f9228c.js → 6954-23438f7f9729748b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{7751-a8f31c062d4cb09d.js → 7751-95349028f1ee3fb5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{79-f9b948ebb186900f.js → 79-488979db197d250c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{7980-4bd08957448dea32.js → 7980-923cd5125080d75a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{9046-04bd7becea207cb1.js → 9046-399597b0e3484cdf.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/9767-d1d54cb9b74c0693.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{main-24f422f93845a596.js → main-090643377c8254e6.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{main-app-94a0711202e08b15.js → main-app-59156a9331ac7bce.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{_app-fc89ce7bed454c84.js → _app-fadef5a6a65d3ec4.js} +8 -8
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-9acaab973dfe86e2.js → manual-9beb93c78931d391.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{add-systems-d258f0c25fa020bf.js → add-systems-661ff00f91fe62df.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/[id]-78de4bde88e18b0f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{new-a9d9402c219d13e5.js → new-c02b14c50b19bd91.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-7dcbcd6f74029d90.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-c27810fc7d8ad4c0.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{reporting-788cf0e34829af46.js → reporting-71c8a8557a0fb316.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-900004e402c31797.js → data-catalog-6dae602b509b00b5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/{[systemId]-b66831fdafcdf67c.js → [systemId]-44fe13c0557746dd.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-49367fa740570834.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-f17380b9fd139dde.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-dfc91b69873ffaab.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{new-803c1b577ab17ae3.js → new-afb5d98731bc1bb1.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-fa743ddc7f89d76b.js → dataset-13e06b0a4a8c114c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-bbe1ca2793798e6b.js → [id]-d796cf4c25d0b988.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-abc17fef69cd951b.js → new-814849a549132ffa.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-be295129568a929c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{index-bfaacdb55a5a6c9f.js → index-b0926c4083d4ac88.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-dadebdf2d6fbcc64.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging-eef56c95b08aa24c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-b1d39bb680cfd6d2.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-ea8c82f36520e542.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-2a56dc41a292a468.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{privacy-requests-d85c0d16ba09ba35.js → privacy-requests-f394d59981a4f50c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/{datamap-afedc48ef4e7f858.js → datamap-b461324d13ae41e6.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-b359f061d3b9d455.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{custom-fields-52d030b1db2ca1b9.js → custom-fields-1c770b51690416d8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-2f03e981234c40ad.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-a08693d0d1e10bc8.js → organization-b208f9fd45ebb829.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/{test-datasets-151571cff4e85894.js → test-datasets-37c8930711ca2b8e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-4f5a28226575c976.js → [id]-d5857bb2ec2f8b67.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{systems-abd68fc5ddde5482.js → systems-4f07a39a7def714a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{taxonomy-16b4d75c49276add.js → taxonomy-8b5ef781c76b3b9e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/{new-be690621a944bfe2.js → new-082c3156175f9267.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/[id]-963b0dbbf93b9e49.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-6c9ad62479a7d03e.js → user-management-cb40808c1509f191.js} +1 -1
- fides/ui-build/static/admin/_next/static/css/687135955af5b7e1.css +1 -0
- fides/ui-build/static/admin/_next/static/css/b89fc4b36b501cf6.css +1 -0
- fides/ui-build/static/admin/_next/static/sSd6wygps1Baq1nFEC_PK/_buildManifest.js +1 -0
- fides/ui-build/static/admin/add-systems/manual.html +1 -1
- fides/ui-build/static/admin/add-systems/multiple.html +1 -1
- fides/ui-build/static/admin/add-systems.html +1 -1
- fides/ui-build/static/admin/ant-poc.html +1 -1
- fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
- fides/ui-build/static/admin/consent/configure.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
- fides/ui-build/static/admin/consent/properties.html +1 -1
- fides/ui-build/static/admin/consent/reporting.html +1 -1
- fides/ui-build/static/admin/consent.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
- fides/ui-build/static/admin/data-catalog.html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
- fides/ui-build/static/admin/data-discovery/activity.html +1 -1
- fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/detection.html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
- fides/ui-build/static/admin/datamap.html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
- fides/ui-build/static/admin/dataset/new.html +1 -1
- fides/ui-build/static/admin/dataset.html +1 -1
- fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
- fides/ui-build/static/admin/datastore-connection/new.html +1 -1
- fides/ui-build/static/admin/datastore-connection.html +1 -1
- fides/ui-build/static/admin/images/connector-logos/website.svg +10 -0
- fides/ui-build/static/admin/index.html +1 -1
- fides/ui-build/static/admin/integrations/[id].html +1 -1
- fides/ui-build/static/admin/integrations.html +1 -1
- fides/ui-build/static/admin/lib/fides-ext-gpp.js +1 -1
- fides/ui-build/static/admin/lib/fides-headless.js +1 -1
- fides/ui-build/static/admin/lib/fides-tcf.js +4 -4
- fides/ui-build/static/admin/lib/fides.js +3 -3
- fides/ui-build/static/admin/login/[provider].html +1 -1
- fides/ui-build/static/admin/login.html +1 -1
- fides/ui-build/static/admin/messaging/[id].html +1 -1
- fides/ui-build/static/admin/messaging/add-template.html +1 -1
- fides/ui-build/static/admin/messaging.html +1 -1
- fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
- fides/ui-build/static/admin/privacy-requests.html +1 -1
- fides/ui-build/static/admin/properties/[id].html +1 -1
- fides/ui-build/static/admin/properties/add-property.html +1 -1
- fides/ui-build/static/admin/properties.html +1 -1
- fides/ui-build/static/admin/reporting/datamap.html +1 -1
- fides/ui-build/static/admin/settings/about.html +1 -1
- fides/ui-build/static/admin/settings/consent.html +1 -1
- fides/ui-build/static/admin/settings/custom-fields.html +1 -1
- fides/ui-build/static/admin/settings/domain-records.html +1 -1
- fides/ui-build/static/admin/settings/domains.html +1 -1
- fides/ui-build/static/admin/settings/email-templates.html +1 -1
- fides/ui-build/static/admin/settings/locations.html +1 -1
- fides/ui-build/static/admin/settings/organization.html +1 -1
- fides/ui-build/static/admin/settings/regulations.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id].html +1 -1
- fides/ui-build/static/admin/systems.html +1 -1
- fides/ui-build/static/admin/taxonomy.html +1 -1
- fides/ui-build/static/admin/user-management/new.html +1 -1
- fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
- fides/ui-build/static/admin/user-management.html +1 -1
- fides/api/service/user/fides_user_service.py +0 -128
- fides/ui-build/static/admin/_next/static/chunks/1150-035a721a04f4451e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1376-5cea5ef9362215e8.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3412-7ec8751b8182e1bf.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4450-36234280bee624ff.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4481-aab99ff80f707473.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5973-52aee296edc44f7e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6315-fa1519cdf080f42d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7453-39761c38da31257e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9767-1a23925d2cb27b51.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/[id]-fb75fa0aea77678d.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience-c946b33b0322b8ad.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-ea57f9d6ad17e957.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-5f9ef1f99818117c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-d001337d1bb73bd1.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-11b3ce9f61d9bfe9.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-a78a73b65929853a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-d4329043219fed9b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging-1e60754abec1ee6b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/[id]-fe765154315782cf.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-f5f7a8069909ef24.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-9f7eaad05e5b9292.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-89524101b7279f6e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-24cba38685dc872c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/[id]-78eaf933f755bfe8.js +0 -1
- fides/ui-build/static/admin/_next/static/css/113d823fe71f6af0.css +0 -1
- fides/ui-build/static/admin/_next/static/css/15fb7d4837a1de34.css +0 -1
- fides/ui-build/static/admin/_next/static/o0mKeH0cB6eAYV6qOlVD0/_buildManifest.js +0 -1
- {ethyca_fides-2.58.2rc0.dist-info → ethyca_fides-2.58.3b0.dist-info/licenses}/LICENSE +0 -0
- {ethyca_fides-2.58.2rc0.dist-info → ethyca_fides-2.58.3b0.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{1100-053fc6b76c65a00f.js → 1100-45c0634b4f51d10c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{3086-b5054ec2c75700b9.js → 3086-d1ba90bc6ac9174b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{355-8a77c9a1cd027f2e.js → 355-45bc45d448c9911b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{4723-0a3c5e2ce143a7d0.js → 4723-ee2929f284f324fe.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{5826-e5dcb4e68cfe6289.js → 5826-1f4f74bf3b5348e4.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{8433-b3008ecaf9834e7f.js → 8433-c4c765833ab9cc07.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{8499-43606100edf42fdf.js → 8499-14fb2a3207baa9a6.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{9282-2bfbdca45e84e810.js → 9282-1a48b10b114d01f4.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{9327-2cba327d10586683.js → 9327-4970d356f7000c0b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{9999-637e0e5341f15f4a.js → 9999-3de189da9fffcc53.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{404-b202c0d8f6fc75c3.js → 404-29560aa2e6a60963.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-ba975134a85588f8.js → multiple-a55d3b39681cca27.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{ant-poc-b9932971a479f3a7.js → ant-poc-404f3c9018952800.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-b34e5324461d0c87.js → add-vendors-9ec60eaff5eece51.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-723cc3d4f5740ea6.js → configure-4403425cf6cb43d1.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-72251b48e2e03a1e.js → [id]-75c2ed6ba3de48cd.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-9611dd42856d6062.js → new-487ae57dc7e2ded2.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-e5748812ba055a56.js → properties-f67fda6a71d0a46b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{consent-39d65f13cc8f1cf8.js → consent-75395dfc224cf44b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-a29850536c85d4b8.js → [projectUrn]-fa65c67ec8c4b5e6.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-c44ce244122e96d5.js → projects-e76a07ee6ee8d55f.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-8cb714cdd44ac40e.js → datamap-c0714c24a342ae76.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-d79551d4c64c398c.js → [...subfieldNames]-704553f5329fb9d4.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-7e5df4a0de7540bb.js → [collectionName]-06c19dca941edb14.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-6ba18f92ba561114.js → [datasetId]-eac517f43d5f53a8.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{integrations-ef8000d7388dc915.js → integrations-373fb3a596099fc9.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-ad02e019b2467958.js → [id]-66f5fbadd8455805.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-f9693cb6a0b7ded8.js → add-template-d441abb1f045940f.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-2987edc77388e85a.js → configure-b8c94b10ab90b061.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-94e2faa73dd6a3e6.js → [id]-f4fb941df069b7bf.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-630a6a3dd6502ba6.js → add-property-bccb6ffab25aa214.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{properties-20ca2f963906674b.js → properties-9a7ac623370b7c00.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-a49d0f84cf0cf05e.js → about-4412a7b468b6d4bf.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-fa42d8f18df44927.js → domain-records-d9088f5cd9fb2822.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-6fd6071e2009b8f2.js → email-templates-cf09ad896c7396a6.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-66c757325cb58467.js → locations-759564ca0ae62840.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-c6c239996cfa6ae8.js → regulations-2dce4501fca920b3.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{webpack-2c7ccac5843c4d8e.js → webpack-03e375f6d6b2c71b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/{o0mKeH0cB6eAYV6qOlVD0 → sSd6wygps1Baq1nFEC_PK}/_ssgManifest.js +0 -0
fides/api/models/comment.py
CHANGED
@@ -3,15 +3,17 @@ from typing import TYPE_CHECKING, Any
|
|
3
3
|
|
4
4
|
from sqlalchemy import Column
|
5
5
|
from sqlalchemy import Enum as EnumColumn
|
6
|
-
from sqlalchemy import ForeignKey, String, UniqueConstraint
|
6
|
+
from sqlalchemy import ForeignKey, String, UniqueConstraint, orm
|
7
7
|
from sqlalchemy.ext.declarative import declared_attr
|
8
8
|
from sqlalchemy.orm import Session, relationship
|
9
9
|
|
10
10
|
from fides.api.db.base_class import Base
|
11
|
+
from fides.api.models.attachment import Attachment, AttachmentReferenceType
|
11
12
|
|
12
13
|
if TYPE_CHECKING:
|
13
|
-
from fides.api.models.attachment import
|
14
|
+
from fides.api.models.attachment import AttachmentReference
|
14
15
|
from fides.api.models.fides_user import FidesUser
|
16
|
+
from fides.api.models.privacy_request import PrivacyRequest
|
15
17
|
|
16
18
|
|
17
19
|
class CommentType(str, EnumType):
|
@@ -87,23 +89,51 @@ class Comment(Base):
|
|
87
89
|
references = relationship(
|
88
90
|
"CommentReference",
|
89
91
|
back_populates="comment",
|
90
|
-
cascade="all, delete",
|
91
|
-
uselist=True,
|
92
|
-
)
|
93
|
-
|
94
|
-
attachments = relationship(
|
95
|
-
"Attachment",
|
96
|
-
secondary="attachment_reference",
|
97
|
-
primaryjoin="Comment.id == AttachmentReference.reference_id",
|
98
|
-
secondaryjoin="Attachment.id == AttachmentReference.attachment_id",
|
99
|
-
order_by="Attachment.created_at",
|
92
|
+
cascade="all, delete-orphan",
|
100
93
|
uselist=True,
|
94
|
+
foreign_keys=[CommentReference.comment_id],
|
95
|
+
primaryjoin=lambda: Comment.id == orm.foreign(CommentReference.comment_id),
|
101
96
|
)
|
102
97
|
|
103
98
|
def delete(self, db: Session) -> None:
|
104
99
|
"""Delete the comment and all associated references."""
|
105
100
|
# Delete the comment
|
106
|
-
|
107
|
-
|
108
|
-
|
101
|
+
Attachment.delete_attachments_for_reference_and_type(
|
102
|
+
db, self.id, AttachmentReferenceType.comment
|
103
|
+
)
|
104
|
+
for reference in self.references:
|
105
|
+
reference.delete(db)
|
109
106
|
db.delete(self)
|
107
|
+
|
108
|
+
@staticmethod
|
109
|
+
def delete_comments_for_reference_and_type(
|
110
|
+
db: Session, reference_id: str, reference_type: CommentReferenceType
|
111
|
+
) -> None:
|
112
|
+
"""
|
113
|
+
Deletes comments associated with a given reference_id and reference_type.
|
114
|
+
Delete all references to the comments.
|
115
|
+
|
116
|
+
Args:
|
117
|
+
db: Database session.
|
118
|
+
reference_id: The reference id to delete.
|
119
|
+
reference_type: The reference type to delete
|
120
|
+
|
121
|
+
Examples:
|
122
|
+
- Delete all comments associated with a privacy request.
|
123
|
+
``Comment.delete_comments_for_reference_and_type(
|
124
|
+
db, privacy_request.id, CommentReferenceType.privacy_request
|
125
|
+
)``
|
126
|
+
"""
|
127
|
+
# Query comments explicitly to avoid lazy loading
|
128
|
+
comments = (
|
129
|
+
db.query(Comment)
|
130
|
+
.join(CommentReference)
|
131
|
+
.filter(
|
132
|
+
CommentReference.reference_id == reference_id,
|
133
|
+
CommentReference.reference_type == reference_type,
|
134
|
+
)
|
135
|
+
.all()
|
136
|
+
)
|
137
|
+
|
138
|
+
for comment in comments:
|
139
|
+
comment.delete(db)
|
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
2
2
|
|
3
3
|
from datetime import datetime
|
4
4
|
from enum import Enum
|
5
|
+
from re import match
|
5
6
|
from typing import Any, Dict, Iterable, List, Optional, Type
|
6
7
|
|
7
8
|
from loguru import logger
|
@@ -35,9 +36,17 @@ class MonitorFrequency(Enum):
|
|
35
36
|
DAILY = "Daily"
|
36
37
|
WEEKLY = "Weekly"
|
37
38
|
MONTHLY = "Monthly"
|
39
|
+
QUARTERLY = "Quarterly"
|
40
|
+
YEARLY = "Yearly"
|
38
41
|
NOT_SCHEDULED = "Not scheduled"
|
39
42
|
|
40
43
|
|
44
|
+
# pattern for a string of 4 comma-separated integers,
|
45
|
+
# used to represent the months of the year that the monitor will run
|
46
|
+
# on quarterly basis, in cron format
|
47
|
+
QUARTERLY_MONTH_PATTERN = r"^\d+,\d+,\d+,\d+$"
|
48
|
+
|
49
|
+
|
41
50
|
class MonitorConfig(Base):
|
42
51
|
"""
|
43
52
|
Monitor configuration used for data detection and discovery.
|
@@ -138,6 +147,13 @@ class MonitorConfig(Base):
|
|
138
147
|
or self.monitor_execution_trigger.get("hour", None) is None
|
139
148
|
):
|
140
149
|
return MonitorFrequency.NOT_SCHEDULED
|
150
|
+
month_trigger = self.monitor_execution_trigger.get("month", None)
|
151
|
+
if month_trigger is not None:
|
152
|
+
if isinstance(month_trigger, str) and match(
|
153
|
+
QUARTERLY_MONTH_PATTERN, month_trigger
|
154
|
+
):
|
155
|
+
return MonitorFrequency.QUARTERLY
|
156
|
+
return MonitorFrequency.YEARLY
|
141
157
|
if self.monitor_execution_trigger.get("day", None) is not None:
|
142
158
|
return MonitorFrequency.MONTHLY
|
143
159
|
if self.monitor_execution_trigger.get("day_of_week", None) is not None:
|
@@ -201,6 +217,10 @@ class MonitorConfig(Base):
|
|
201
217
|
a Tuesday.
|
202
218
|
- with an `execution_frequency` of "monthly", it will result in monthly
|
203
219
|
execution at 12:00:00+00:00 on the 14th day of every month.
|
220
|
+
- with an `execution_frequency` of "quarterly", it will result in quarterly
|
221
|
+
execution at 12:00:00+00:00 on the 14th day of the first month of each quarter.
|
222
|
+
- with an `execution_frequency` of "yearly", it will result in yearly
|
223
|
+
execution at 12:00:00+00:00 on May 14th of each year.
|
204
224
|
|
205
225
|
See https://apscheduler.readthedocs.io/en/3.x/modules/triggers/cron.html
|
206
226
|
for more information about the cron trigger parameters.
|
@@ -221,6 +241,17 @@ class MonitorConfig(Base):
|
|
221
241
|
cron_trigger_dict["day_of_week"] = execution_start_date.weekday()
|
222
242
|
if execution_frequency == MonitorFrequency.MONTHLY:
|
223
243
|
cron_trigger_dict["day"] = execution_start_date.day
|
244
|
+
if execution_frequency == MonitorFrequency.QUARTERLY:
|
245
|
+
cron_trigger_dict["day"] = execution_start_date.day
|
246
|
+
# Calculate which month of the quarter (0-2) this is
|
247
|
+
month_of_quarter = (execution_start_date.month - 1) % 3
|
248
|
+
# Set to run in the same month of each quarter (1, 4, 7, 10 for first month)
|
249
|
+
cron_trigger_dict["month"] = (
|
250
|
+
f"{1 + month_of_quarter},{4 + month_of_quarter},{7 + month_of_quarter},{10 + month_of_quarter}"
|
251
|
+
)
|
252
|
+
if execution_frequency == MonitorFrequency.YEARLY:
|
253
|
+
cron_trigger_dict["day"] = execution_start_date.day
|
254
|
+
cron_trigger_dict["month"] = execution_start_date.month
|
224
255
|
data["monitor_execution_trigger"] = cron_trigger_dict
|
225
256
|
|
226
257
|
|
fides/api/models/fides_user.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# pylint: disable=unused-import
|
2
2
|
from __future__ import annotations
|
3
3
|
|
4
|
-
import uuid
|
5
4
|
from datetime import datetime
|
6
5
|
from typing import TYPE_CHECKING, Any, List
|
7
6
|
|
@@ -10,6 +9,10 @@ from sqlalchemy import Boolean, Column, DateTime
|
|
10
9
|
from sqlalchemy import Enum as EnumColumn
|
11
10
|
from sqlalchemy import String
|
12
11
|
from sqlalchemy.orm import Session, relationship
|
12
|
+
from sqlalchemy_utils.types.encrypted.encrypted_type import (
|
13
|
+
AesGcmEngine,
|
14
|
+
StringEncryptedType,
|
15
|
+
)
|
13
16
|
|
14
17
|
from fides.api.common_exceptions import SystemManagerException
|
15
18
|
from fides.api.cryptography.cryptographic_util import (
|
@@ -20,8 +23,8 @@ from fides.api.db.base_class import Base
|
|
20
23
|
from fides.api.models.audit_log import AuditLog
|
21
24
|
|
22
25
|
# Intentionally importing SystemManager here to build the FidesUser.systems relationship
|
23
|
-
from fides.api.models.system_manager import SystemManager # type: ignore[unused-import]
|
24
26
|
from fides.api.schemas.user import DisabledReason
|
27
|
+
from fides.config import CONFIG
|
25
28
|
|
26
29
|
if TYPE_CHECKING:
|
27
30
|
from fides.api.models.sql_models import System # type: ignore[attr-defined]
|
@@ -34,12 +37,22 @@ class FidesUser(Base):
|
|
34
37
|
email_address = Column(CIText, unique=True, nullable=True)
|
35
38
|
first_name = Column(String, nullable=True)
|
36
39
|
last_name = Column(String, nullable=True)
|
37
|
-
hashed_password = Column(String, nullable=
|
38
|
-
salt = Column(String, nullable=
|
40
|
+
hashed_password = Column(String, nullable=True)
|
41
|
+
salt = Column(String, nullable=True)
|
39
42
|
disabled = Column(Boolean, nullable=False, server_default="f")
|
40
43
|
disabled_reason = Column(EnumColumn(DisabledReason), nullable=True)
|
41
44
|
last_login_at = Column(DateTime(timezone=True), nullable=True)
|
42
45
|
password_reset_at = Column(DateTime(timezone=True), nullable=True)
|
46
|
+
password_login_enabled = Column(Boolean, nullable=True)
|
47
|
+
totp_secret = Column(
|
48
|
+
StringEncryptedType(
|
49
|
+
type_in=String(),
|
50
|
+
key=CONFIG.security.app_encryption_key,
|
51
|
+
engine=AesGcmEngine,
|
52
|
+
padding="pkcs5",
|
53
|
+
),
|
54
|
+
nullable=True,
|
55
|
+
)
|
43
56
|
|
44
57
|
# passive_deletes="all" prevents audit logs from having their
|
45
58
|
# privacy_request_id set to null when a privacy_request is deleted.
|
@@ -79,11 +92,11 @@ class FidesUser(Base):
|
|
79
92
|
"""Create a FidesUser by hashing the password with a generated salt
|
80
93
|
and storing the hashed password and the salt"""
|
81
94
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
95
|
+
if password := data.get("password"):
|
96
|
+
hashed_password, salt = FidesUser.hash_password(password)
|
97
|
+
else:
|
98
|
+
hashed_password = None
|
99
|
+
salt = None
|
87
100
|
|
88
101
|
user = super().create(
|
89
102
|
db,
|
@@ -96,6 +109,7 @@ class FidesUser(Base):
|
|
96
109
|
"last_name": data.get("last_name"),
|
97
110
|
"disabled": data.get("disabled") or False,
|
98
111
|
"disabled_reason": data.get("disabled_reason"),
|
112
|
+
"password_login_enabled": data.get("password_login_enabled"),
|
99
113
|
},
|
100
114
|
check_name=check_name,
|
101
115
|
)
|
@@ -104,6 +118,9 @@ class FidesUser(Base):
|
|
104
118
|
|
105
119
|
def credentials_valid(self, password: str, encoding: str = "UTF-8") -> bool:
|
106
120
|
"""Verifies that the provided password is correct."""
|
121
|
+
if self.salt is None:
|
122
|
+
return False
|
123
|
+
|
107
124
|
provided_password_hash = hash_credential_with_salt(
|
108
125
|
password.encode(encoding),
|
109
126
|
self.salt.encode(encoding),
|
@@ -67,6 +67,8 @@ class FidesUserInvite(Base):
|
|
67
67
|
|
68
68
|
def invite_code_valid(self, invite_code: str, encoding: str = "UTF-8") -> bool:
|
69
69
|
"""Verifies that the provided invite code is correct."""
|
70
|
+
if self.salt is None:
|
71
|
+
return False
|
70
72
|
|
71
73
|
invite_code_hash = hash_credential_with_salt(
|
72
74
|
invite_code.encode(encoding),
|
@@ -20,6 +20,7 @@ from fides.api.models import (
|
|
20
20
|
from fides.api.models.location_regulation_selections import PrivacyNoticeRegion
|
21
21
|
from fides.api.models.privacy_notice import PrivacyNotice
|
22
22
|
from fides.api.models.property import Property
|
23
|
+
from fides.api.models.tcf_publisher_restrictions import TCFConfiguration
|
23
24
|
from fides.api.schemas.language import SupportedLanguage
|
24
25
|
|
25
26
|
|
@@ -46,6 +47,21 @@ class Layer1ButtonOption(Enum):
|
|
46
47
|
|
47
48
|
ACKNOWLEDGE = "acknowledge"
|
48
49
|
OPT_IN_OPT_OUT = "opt_in_opt_out"
|
50
|
+
OPT_IN_ONLY = "opt_in_only"
|
51
|
+
|
52
|
+
|
53
|
+
class RejectAllMechanism(Enum):
|
54
|
+
"""
|
55
|
+
Reject all mechanism options - not formalized in the db.
|
56
|
+
Used to configure the behavior of the reject all button in TCF experiences
|
57
|
+
"""
|
58
|
+
|
59
|
+
# Reject both consent and legitimate interest preferences (all purposes, special features, vendors)
|
60
|
+
# This is the default behavior
|
61
|
+
REJECT_ALL = "reject_all"
|
62
|
+
# Reject only consent preferences (all purposes, special features, vendors).
|
63
|
+
# Do not reject any legitimate interest preferences.
|
64
|
+
REJECT_CONSENT_ONLY = "reject_consent_only"
|
49
65
|
|
50
66
|
|
51
67
|
# Fides JS UX Types - there should only be one of these defined per region
|
@@ -179,6 +195,10 @@ class PrivacyExperienceConfig(PrivacyExperienceConfigBase, Base):
|
|
179
195
|
The Privacy Experience Configuration model that stores shared configuration for Privacy Experiences.
|
180
196
|
|
181
197
|
- Translations, Notices, and Regions (via Privacy Experiences) are linked to this resource.
|
198
|
+
|
199
|
+
If you're adding a new PrivacyExperienceConfig, make sure to use the `create` method since it has
|
200
|
+
custom logic that ensures other resources are created/updated as needed, as well as setting the
|
201
|
+
expected values for some fields in the experience config itself.
|
182
202
|
"""
|
183
203
|
|
184
204
|
allow_language_selection = Column(
|
@@ -203,6 +223,20 @@ class PrivacyExperienceConfig(PrivacyExperienceConfigBase, Base):
|
|
203
223
|
String, ForeignKey(ExperienceConfigTemplate.id_field_path)
|
204
224
|
) # The template from which this config was created if applicable
|
205
225
|
|
226
|
+
# Mechanism to use when the reject all button is clicked in a TCF experience
|
227
|
+
# Nullable because this is not applicable for other experience types
|
228
|
+
reject_all_mechanism = Column(
|
229
|
+
EnumColumn(RejectAllMechanism),
|
230
|
+
nullable=True,
|
231
|
+
)
|
232
|
+
# Optional FK to a TCF Configuration
|
233
|
+
|
234
|
+
tcf_configuration_id = Column(
|
235
|
+
String,
|
236
|
+
ForeignKey(TCFConfiguration.id_field_path, ondelete="SET NULL"),
|
237
|
+
nullable=True,
|
238
|
+
)
|
239
|
+
|
206
240
|
# Relationships
|
207
241
|
experiences = relationship(
|
208
242
|
"PrivacyExperience",
|
@@ -232,6 +266,12 @@ class PrivacyExperienceConfig(PrivacyExperienceConfigBase, Base):
|
|
232
266
|
lazy="selectin",
|
233
267
|
)
|
234
268
|
|
269
|
+
tcf_configuration: RelationshipProperty[Optional[TCFConfiguration]] = relationship(
|
270
|
+
"TCFConfiguration",
|
271
|
+
back_populates="privacy_experience_configs",
|
272
|
+
lazy="selectin",
|
273
|
+
)
|
274
|
+
|
235
275
|
@property
|
236
276
|
def regions(self) -> List[PrivacyNoticeRegion]:
|
237
277
|
"""Return the regions using this experience config"""
|
@@ -304,6 +344,15 @@ class PrivacyExperienceConfig(PrivacyExperienceConfigBase, Base):
|
|
304
344
|
# Link Properties to this Privacy Experience config via the PrivacyExperienceConfigProperty table
|
305
345
|
link_properties_to_experience_config(db, properties, experience_config)
|
306
346
|
|
347
|
+
# If the reject all mechanism is not set and the experience config is a TCF experience,
|
348
|
+
# set the reject all mechanism to REJECT_ALL
|
349
|
+
if (
|
350
|
+
experience_config.component == ComponentType.tcf_overlay
|
351
|
+
and experience_config.reject_all_mechanism is None
|
352
|
+
):
|
353
|
+
experience_config.reject_all_mechanism = RejectAllMechanism.REJECT_ALL # type: ignore
|
354
|
+
experience_config.save(db)
|
355
|
+
|
307
356
|
return experience_config
|
308
357
|
|
309
358
|
def update(self, db: Session, *, data: dict[str, Any]) -> PrivacyExperienceConfig:
|
@@ -507,6 +556,24 @@ class PrivacyExperienceConfigHistory(
|
|
507
556
|
index=True,
|
508
557
|
) # If a translation is deleted, this is set to null, but the overall record remains in the database for reporting purposes
|
509
558
|
|
559
|
+
# Mechanism to use when the reject all button is clicked in a TCF experience
|
560
|
+
# Nullable because this is not applicable for other experience types
|
561
|
+
reject_all_mechanism = Column(
|
562
|
+
EnumColumn(RejectAllMechanism),
|
563
|
+
nullable=True,
|
564
|
+
)
|
565
|
+
# Optional FK to a TCF Configuration
|
566
|
+
tcf_configuration_id = Column(
|
567
|
+
String,
|
568
|
+
ForeignKey(TCFConfiguration.id_field_path, ondelete="SET NULL"),
|
569
|
+
nullable=True,
|
570
|
+
)
|
571
|
+
|
572
|
+
tcf_configuration: RelationshipProperty[Optional[TCFConfiguration]] = relationship(
|
573
|
+
"TCFConfiguration",
|
574
|
+
lazy="selectin",
|
575
|
+
)
|
576
|
+
|
510
577
|
version = Column(Float, nullable=False, default=1.0)
|
511
578
|
|
512
579
|
|
@@ -569,6 +636,7 @@ class PrivacyExperience(Base):
|
|
569
636
|
tcf_special_features: List = []
|
570
637
|
tcf_system_consents: List = []
|
571
638
|
tcf_system_legitimate_interests: List = []
|
639
|
+
tcf_publisher_restrictions: List = []
|
572
640
|
gvl: Optional[Dict] = {}
|
573
641
|
# TCF Developer-Friendly Meta added at runtime as the result of build_tc_data_for_mobile
|
574
642
|
meta: Dict = {}
|
@@ -39,10 +39,14 @@ from fides.api.graph.config import (
|
|
39
39
|
CollectionAddress,
|
40
40
|
)
|
41
41
|
from fides.api.migrations.hash_migration_mixin import HashMigrationMixin
|
42
|
-
from fides.api.models.attachment import
|
42
|
+
from fides.api.models.attachment import (
|
43
|
+
Attachment,
|
44
|
+
AttachmentReference,
|
45
|
+
AttachmentReferenceType,
|
46
|
+
)
|
43
47
|
from fides.api.models.audit_log import AuditLog
|
44
48
|
from fides.api.models.client import ClientDetail
|
45
|
-
from fides.api.models.comment import Comment, CommentReference
|
49
|
+
from fides.api.models.comment import Comment, CommentReference, CommentReferenceType
|
46
50
|
from fides.api.models.fides_user import FidesUser
|
47
51
|
from fides.api.models.manual_webhook import AccessManualWebhook
|
48
52
|
from fides.api.models.policy import (
|
@@ -169,18 +173,25 @@ class PrivacyRequest(
|
|
169
173
|
backref="privacy_requests",
|
170
174
|
)
|
171
175
|
attachments = relationship(
|
172
|
-
Attachment,
|
176
|
+
"Attachment",
|
173
177
|
secondary="attachment_reference",
|
174
|
-
primaryjoin="PrivacyRequest.id == AttachmentReference.reference_id"
|
178
|
+
primaryjoin="and_(PrivacyRequest.id == AttachmentReference.reference_id, "
|
179
|
+
"AttachmentReference.reference_type == 'privacy_request')",
|
175
180
|
secondaryjoin="Attachment.id == AttachmentReference.attachment_id",
|
176
181
|
order_by="Attachment.created_at",
|
182
|
+
viewonly=True,
|
183
|
+
uselist=True,
|
177
184
|
)
|
185
|
+
|
178
186
|
comments = relationship(
|
179
|
-
Comment,
|
187
|
+
"Comment",
|
180
188
|
secondary="comment_reference",
|
181
|
-
primaryjoin="PrivacyRequest.id == CommentReference.reference_id"
|
189
|
+
primaryjoin="and_(PrivacyRequest.id == CommentReference.reference_id, "
|
190
|
+
"CommentReference.reference_type == 'privacy_request')",
|
182
191
|
secondaryjoin="Comment.id == CommentReference.comment_id",
|
183
192
|
order_by="Comment.created_at",
|
193
|
+
viewonly=True,
|
194
|
+
uselist=True,
|
184
195
|
)
|
185
196
|
property_id = Column(String, nullable=True)
|
186
197
|
|
@@ -323,6 +334,12 @@ class PrivacyRequest(
|
|
323
334
|
deleting this object from the database
|
324
335
|
"""
|
325
336
|
self.clear_cached_values()
|
337
|
+
Attachment.delete_attachments_for_reference_and_type(
|
338
|
+
db, self.id, AttachmentReferenceType.privacy_request
|
339
|
+
)
|
340
|
+
Comment.delete_comments_for_reference_and_type(
|
341
|
+
db, self.id, CommentReferenceType.privacy_request
|
342
|
+
)
|
326
343
|
|
327
344
|
for provided_identity in self.provided_identities: # type: ignore[attr-defined]
|
328
345
|
provided_identity.delete(db=db)
|