Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

414- adds DRP action to Policy #453

Merged
merged 13 commits into from
May 7, 2022
Merged

414- adds DRP action to Policy #453

merged 13 commits into from
May 7, 2022

Conversation

eastandwestwind
Copy link
Contributor

@eastandwestwind eastandwestwind commented May 3, 2022

Purpose

Adds ability to add DRP Action to any given Policy.

Changes

  • DB migration to Policy table
  • Adds DRP action to Policy model
  • Adds validation such that DRP action is valid, and that any given DRP action is only used once across Policies
  • Adds docs
  • Adds unit tests for Policy model/endpoints

Checklist

  • Applicable documentation updated (guides, quickstart, postman collections, tutorial, fidesdemo, database diagram.
  • If docs updated (select one):
    • documentation complete, or draft/outline provided (tag docs-team to complete/review on this branch)
    • documentation issue created (tag docs-team to complete issue separately)
  • Good unit test/integration test coverage
  • This PR contains a DB migration. If checked, the reviewer should confirm with the author that the down_revision correctly references the previous migration before merging
  • The Run Unsafe PR Checks label has been applied, and checks have passed, if this PR touches any external services

Ticket

Fixes #414

@eastandwestwind
Copy link
Contributor Author

Lint failing due to known issue on main. Will be fixed here- #448

@seanpreston seanpreston self-assigned this May 5, 2022
Copy link
Contributor

@seanpreston seanpreston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly there, a couple of minor changes around how the validation works required. Thanks @eastandwestwind

@eastandwestwind
Copy link
Contributor Author

Thanks for the review @seanpreston! Just need some additional input from you, above

@conceptualshark
Copy link
Contributor

Spoke with @adriaaaa about the docs changes - I ended up doing some cleanup and will break out some additional documentation in a new ticket, so this is good from me. 👍

@classmethod
def create_or_update(cls, db: Session, *, data: Dict[str, Any]) -> FidesopsBase:
"""Overrides base create or update to add custom error for drp action already exists"""
db_obj = cls.get_by_key_or_id(db=db, data=data)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making this change!

@eastandwestwind
Copy link
Contributor Author

Ok, ready to go again @seanpreston!

@seanpreston seanpreston merged commit 337bd29 into main May 7, 2022
@seanpreston seanpreston deleted the 414-drp-action branch May 7, 2022 01:04
adamsachs pushed a commit to adamsachs/fidesops_forked_test that referenced this pull request May 17, 2022
* adds drp action type to db, adds docs, tests

* fix lint, tests

* format

* remove unneeded func arg

* lint

* more lint

* CR changes

* update alembic down migration number

* minor docs updates for drp

* integration tests and updating alembic

* catches integrity error at endpoint level

* lint

Co-authored-by: Cole Isaac <[email protected]>
sanders41 pushed a commit that referenced this pull request Sep 22, 2022
* adds drp action type to db, adds docs, tests

* fix lint, tests

* format

* remove unneeded func arg

* lint

* more lint

* CR changes

* update alembic down migration number

* minor docs updates for drp

* integration tests and updating alembic

* catches integrity error at endpoint level

* lint

Co-authored-by: Cole Isaac <[email protected]>
dependabot bot added a commit that referenced this pull request Sep 23, 2022
* adds drp action type to db, adds docs, tests

* fix lint, tests

* format

* remove unneeded func arg

* lint

* more lint

* CR changes

* update alembic down migration number

* minor docs updates for drp

* integration tests and updating alembic

* catches integrity error at endpoint level

* lint

Co-authored-by: Cole Isaac <[email protected]>
dependabot bot added a commit that referenced this pull request Sep 23, 2022
* adds drp action type to db, adds docs, tests

* fix lint, tests

* format

* remove unneeded func arg

* lint

* more lint

* CR changes

* update alembic down migration number

* minor docs updates for drp

* integration tests and updating alembic

* catches integrity error at endpoint level

* lint

Co-authored-by: Cole Isaac <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DRP] Add DRP action name to Fidesops Policy Model
3 participants