-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
👔(dashboard) update the consent status update logic and add validatio…
…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
- Loading branch information
Showing
5 changed files
with
469 additions
and
66 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
"""Dashboard consent exceptions.""" | ||
|
||
from django.core.exceptions import ValidationError | ||
from django.utils.translation import gettext as _ | ||
|
||
|
||
class ConsentWorkflowError(ValidationError): | ||
"""Exception for consent workflow validation errors.""" | ||
|
||
DEFAULT_MESSAGE = _("Consent workflow error.") | ||
|
||
def __init__(self, custom_message=None): | ||
"""Initialize the exception with an optional custom message.""" | ||
super().__init__(custom_message or self.DEFAULT_MESSAGE) |
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.