Four-eyes principle
What does a four-eyes principle do?​
The four-eyes principle is the principle that states that for certain tasks and/or actions, at least two or more people are always needed, so that they can check each other. This is to prevent fraud or increased risks.
The system checks whether the reviewer who performed status transition X is not the same reviewer as the user performing a status transition to Y.
Instructions​
Action settings​
The following actions need to be configured:
- Add the action
AddDossierReviewto the dossier status transitions where a review is required (e.g.,DOSSIER_STATUS_1andDOSSIER_STATUS_2). - Add the action
ClearDossierReviewsto the dossier status transition where the reviews should be cleared (e.g., when moving back toOPEN).
[
{
"type": "DOSSIER_STATUS_TRANSITION",
"value": "DOSSIER_STATUS_1",
"className": "eu.myharmoney.app.bll.executors.dossierstatustransition.AddDossierReview",
"synchronous": true,
"enabled": true,
"remove": false
},
{
"type": "DOSSIER_STATUS_TRANSITION",
"value": "DOSSIER_STATUS_2",
"className": "eu.myharmoney.app.bll.executors.dossierstatustransition.AddDossierReview",
"synchronous": true,
"enabled": true,
"remove": false
},
{
"type": "DOSSIER_STATUS_TRANSITION",
"value": "OPEN",
"className": "eu.myharmoney.app.bll.executors.dossierstatustransition.ClearDossierReviews",
"synchronous": true,
"enabled": true,
"remove": false
}
]
Dossier status transition settings​
Add the validation which checks if the reviewers are different from each other.
{
"DOSSIER_STATUS_1": [
{
"to": "DOSSIER_STATUS_2",
"forRoles": [],
"validations": [
{
"className": "eu.myharmoney.app.bll.validators.dossierstatustransition.ValidateDifferentReviewers",
"enabled": true
}
]
}
]
}
✅ To test​
- Process the dossier until you end up in
DOSSIER_STATUS_1. - Try to proceed to
DOSSIER_STATUS_2 - The system doesn't allow you to proceed to
DOSSIER_STATUS_2. - Another user can proceed the dossier to
DOSSIER_STATUS_2. - Bring the dossier to
DONE,REOPENand repeat the steps above to double-check if this use case is covered.