reset account blocked flag #13

Merged
lash merged 2 commits from reset-account-blocked-flag into master 2025-01-21 07:47:33 +01:00
Member
  • Reset the incorrect PIN attempts to 0 when the PIN is reset
  • Reset the flag_account_blocked if the PIN attempts is 0
  • Resolves issue urdt/ussd#280
- Reset the incorrect PIN attempts to 0 when the PIN is reset - Reset the flag_account_blocked if the PIN attempts is 0 - Resolves issue https://git.grassecon.net/urdt/ussd/issues/280
Alfred-mk added 2 commits 2025-01-21 00:32:33 +01:00
Alfred-mk requested review from lash 2025-01-21 00:32:43 +01:00
lash reviewed 2025-01-21 07:12:23 +01:00
@ -256,0 +265,4 @@
return res, fmt.Errorf("missing session")
}
currentWrongPinAttempts, err := store.ReadEntry(ctx, sessionId, storedb.DATA_INCORRECT_PIN_ATTEMPTS)
Owner

why is the check for incorrect pin attempts needed here? Why not just put it as part of the incorrect pin reset? Wouldn't that reduce the need for one read operation?

why is the check for incorrect pin attempts needed here? Why not just put it as part of the incorrect pin reset? Wouldn't that reduce the need for one read operation?
Author
Member

The check exists to reset the flag once the user access the menu.

Having the operation as part of the PIN reset increased complexity as we need to access the state of the user, reset the account blocked flag and save the state

The check exists to reset the flag once the user access the menu. Having the operation as part of the PIN reset increased complexity as we need to access the state of the user, reset the account blocked flag and save the state
Owner

Hmm. Ok. It's not entirely clear to me why it is like this, as any point where the pin is reset would simply enable to set the flag as reset? There would be no need to read the flag?

Hmm. Ok. It's not entirely clear to me why it is like this, as any point where the pin is reset would simply enable to set the flag as reset? There would be no need to read the flag?
lash merged commit 7d513ac2a7 into master 2025-01-21 07:47:33 +01:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: grassrootseconomics/sarafu-vise#13
No description provided.