Skip to content
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

Consumer API: Create identity deletion process as owner; create identity deletion process as support; deletion process approval #523

Merged
merged 103 commits into from
Feb 16, 2024

Conversation

tnotheis
Copy link
Member

Readiness checklist

  • I added/updated unit tests.
  • I added/updated integration tests.
  • I ensured that the PR title is good enough for the changelog.
  • I labeled the PR.

tnotheis and others added 30 commits October 23, 2023 13:49
…backbone into trigger-identity-deletion-process
…backbone into trigger-identity-deletion-process
…backbone into trigger-identity-deletion-process
tnotheis and others added 22 commits February 13, 2024 08:45
* feat: add handler for deletion process waiting for approval reminder

* refactor: change messages in audit log and change validation when sending reminders

* test: add more unit test cases for identity deletion process approval reminders after fixing the methods

* refactor: restructure handler to account for scenarios where multiple reminders would be sent and only one should be

* test: update unit tests after refactoring

* chore: add reminders migrations

* feat: add approve deletion process command and unit tests

* chore: add missing migrations

* refactor: adjust approve deletion process handler to receive and validate de deletion process

* feat: command should return deletion process. Add Integration event and refactor existing folder structure.

* feat: add integration events for external event propagation

* fix: approved at in command response can never be null

* fix: changes after merging with base branch

* refactor: remove unnecessary setters

* refactor: switch the order of parameters

* refactor: return Ok instead of Created

* refactor: use generic NoDeletionProcessWithRequiredStatusExists for deletion process in an incorrect status

* refactor: remove unused errors

* refactor: move the status check to IdentityDeletionProcess.Approve method

* refactor: update the error message as requested in the PR

* feat: trigger integration event for tier change

* refactor: update ctor to take tier ids directly

* refactor: remove unnecessary tiers repository calls

* refactor: instantiate integration event with tier ids

* chore: remove unused directives

* refactor: modify integration event instantiation to take in tier ids directly

* chore: modify tests to instantiate integration events using tier ids directly

* feat: trigger the integration event for the tier change

* feat: set tier id and status when set to be deleted

* test: add dummy IEventBus

* test: update assertion to the new error code

* test: introduce additional assertions related to tier id and status

* chore: rename variable

* chore: rename method

* chore: reduce payload to contain only the necessary information

* refactor: remove unnecessary fields

* feat: add TierBeforeDeletionId property

* feat: add migration which adds TierBeforeDeletionId column to Identity table

* chore: fix formatting

* chore: rename class properties to better reflect what they are

* chore: rename TierBeforeDeletionId to TierIdBeforeDeletion

* feat: do not trigger PeerIdentityToBeDeletedIntegrationEvent due to data protection reasons

* chore: do not change tier when deletion process started by support

* chore: update incoming integration event property names

* chore: fix failing ci/cd tests

* chore: update migration so that TierIdBeforeDeletion column is added to Identities table

* chore: fix formatting

* chore: use Dummy instead of Fake

* refactor: use DeletionProcessId instead of string

* test: fix failing tests

* refactor: use IdentityDeletionProcessId.Value

* test: use valid form of IdentityDeletionProcessId

* test: update IdentityDeletionProcessId value

* refactor: remove duplicate code

* feat: throw exception if IdentityDeletionProcessId input string is not valid

* chore: use IdentityDeletionProcessId directly

* refactor: use identityDeletionProcessIdResult.Error

---------

Co-authored-by: Daniel Silva <[email protected]>
Co-authored-by: Nikola Vetnić <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Timo Notheisen <[email protected]>
@tnotheis tnotheis changed the title Identity deletion Create identity deletion process as owner; create identity deletion process as support; deletion process approval Feb 16, 2024
@tnotheis tnotheis requested a review from jkoenig134 February 16, 2024 14:55
@tnotheis tnotheis enabled auto-merge (squash) February 16, 2024 14:55
@tnotheis tnotheis merged commit bd2e143 into main Feb 16, 2024
14 checks passed
@tnotheis tnotheis deleted the identity-deletion branch February 16, 2024 15:55
@tnotheis tnotheis changed the title Create identity deletion process as owner; create identity deletion process as support; deletion process approval Consumer API: Create identity deletion process as owner; create identity deletion process as support; deletion process approval Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants