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

👔(dashboard) update consent status logic when update from validated to revoked #341

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

ssorin
Copy link
Collaborator

@ssorin ssorin commented Jan 15, 2025

Purpose

Validated consent can be changed to revoked.
Only the status and revoked_at fields can be modified during this modification.

Proposal

  • add validation on the allowed fields
  • add validation when consent status is updated from validated status
  • add documentation on business logic of consent in the readme.md file

@ssorin ssorin self-assigned this Jan 15, 2025
@ssorin ssorin added improvement WIP dashboard Item related to the Dashboard service labels Jan 15, 2025
@ssorin ssorin force-pushed the feature/dashboard/consent-can-revoked-if-validated branch 5 times, most recently from f4e57a8 to ab53cc6 Compare January 16, 2025 08:51
@ssorin ssorin added needs review and removed WIP labels Jan 16, 2025
@ssorin ssorin requested a review from jmaupetit January 16, 2025 08:52
@ssorin ssorin marked this pull request as ready for review January 16, 2025 08:52
Copy link
Member

@jmaupetit jmaupetit left a comment

Choose a reason for hiding this comment

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

Current implementation looks a bit too complicated and needs to be more straightforward.

src/dashboard/apps/consent/exceptions.py Outdated Show resolved Hide resolved
src/dashboard/apps/consent/models.py Outdated Show resolved Hide resolved
@ssorin ssorin force-pushed the feature/dashboard/consent-can-revoked-if-validated branch 2 times, most recently from f33a9e4 to 1a118a2 Compare January 16, 2025 16:43
Copy link
Member

@jmaupetit jmaupetit left a comment

Choose a reason for hiding this comment

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

This is much more readable, great!

src/dashboard/CHANGELOG.md Outdated Show resolved Hide resolved
src/dashboard/apps/consent/models.py Outdated Show resolved Hide resolved
src/dashboard/apps/consent/models.py Show resolved Hide resolved
src/dashboard/apps/consent/tests/test_models.py Outdated Show resolved Hide resolved
@ssorin ssorin force-pushed the feature/dashboard/consent-can-revoked-if-validated branch from 1a118a2 to b9d7bf4 Compare January 20, 2025 11:59
…n checks

- Implemented more stringent validation checks during the status change from `VALIDATED` to `REVOKED`. This update ensures that only the necessary fields can be adjusted during this transition.
- add validation on the allowed fields
- add validation when consent status is updated from validated status
- add documentation on business logic of consent in the readme.md file
- add custom consent exception
- update test
- update changelog
@ssorin ssorin force-pushed the feature/dashboard/consent-can-revoked-if-validated branch from b9d7bf4 to 40e0364 Compare January 20, 2025 12:00
Copy link
Member

@jmaupetit jmaupetit left a comment

Choose a reason for hiding this comment

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

@ssorin ssorin merged commit 51d44be into main Jan 20, 2025
10 checks passed
@ssorin ssorin deleted the feature/dashboard/consent-can-revoked-if-validated branch January 20, 2025 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dashboard Item related to the Dashboard service improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants