Compare commits
4 Commits
f96f9c11e6
...
33c376c971
Author | SHA1 | Date | |
---|---|---|---|
33c376c971 | |||
514f6ae05b | |||
8a6659a98b | |||
d094af9c51 |
@ -288,6 +288,8 @@ func (h *MenuHandlers) CheckBlockedStatus(ctx context.Context, sym string, input
|
||||
return res, fmt.Errorf("missing session")
|
||||
}
|
||||
|
||||
res.FlagReset = append(res.FlagReset, flag_account_pin_reset)
|
||||
|
||||
selfPinReset, err := store.ReadEntry(ctx, sessionId, storedb.DATA_SELF_PIN_RESET)
|
||||
if err == nil {
|
||||
pinResetValue, _ := strconv.ParseUint(string(selfPinReset), 0, 64)
|
||||
@ -505,6 +507,7 @@ func (h *MenuHandlers) ConfirmPinChange(ctx context.Context, sym string, input [
|
||||
return res, fmt.Errorf("missing session")
|
||||
}
|
||||
flag_pin_mismatch, _ := h.flagManager.GetFlag("flag_pin_mismatch")
|
||||
flag_account_pin_reset, _ := h.flagManager.GetFlag("flag_account_pin_reset")
|
||||
|
||||
if string(input) == "0" {
|
||||
res.FlagReset = append(res.FlagReset, flag_pin_mismatch)
|
||||
@ -535,6 +538,13 @@ func (h *MenuHandlers) ConfirmPinChange(ctx context.Context, sym string, input [
|
||||
logg.ErrorCtxf(ctx, "failed to write DATA_ACCOUNT_PIN entry with", "key", storedb.DATA_ACCOUNT_PIN, "hashedPIN value", hashedTemporaryPin, "error", err)
|
||||
return res, err
|
||||
}
|
||||
// set the DATA_SELF_PIN_RESET as 0
|
||||
err = store.WriteEntry(ctx, sessionId, storedb.DATA_SELF_PIN_RESET, []byte("0"))
|
||||
if err != nil {
|
||||
logg.ErrorCtxf(ctx, "failed to write DATA_SELF_PIN_RESET entry with", "key", storedb.DATA_SELF_PIN_RESET, "self PIN reset value", "0", "error", err)
|
||||
return res, err
|
||||
}
|
||||
res.FlagReset = append(res.FlagReset, flag_account_pin_reset)
|
||||
|
||||
return res, nil
|
||||
}
|
||||
|
2
services/registration/authorize_reset_others_pin
Normal file
2
services/registration/authorize_reset_others_pin
Normal file
@ -0,0 +1,2 @@
|
||||
{{.retrieve_blocked_number}} will get a PIN reset request.
|
||||
Please enter your PIN to confirm:
|
12
services/registration/authorize_reset_others_pin.vis
Normal file
12
services/registration/authorize_reset_others_pin.vis
Normal file
@ -0,0 +1,12 @@
|
||||
LOAD retrieve_blocked_number 0
|
||||
RELOAD retrieve_blocked_number
|
||||
MAP retrieve_blocked_number
|
||||
MOUT back 0
|
||||
MOUT quit 9
|
||||
LOAD authorize_account 6
|
||||
HALT
|
||||
RELOAD authorize_account
|
||||
CATCH incorrect_pin flag_incorrect_pin 1
|
||||
INCMP _ 0
|
||||
INCMP quit 9
|
||||
INCMP pin_reset_result *
|
2
services/registration/authorize_reset_others_pin_swa
Normal file
2
services/registration/authorize_reset_others_pin_swa
Normal file
@ -0,0 +1,2 @@
|
||||
{{.retrieve_blocked_number}} atapokea ombi la kuweka upya PIN.
|
||||
Tafadhali weka PIN yako kudhibitisha:
|
@ -7,4 +7,4 @@ INCMP _ 0
|
||||
LOAD validate_blocked_number 6
|
||||
RELOAD validate_blocked_number
|
||||
CATCH unregistered_number flag_unregistered_number 1
|
||||
INCMP enter_others_new_pin *
|
||||
INCMP authorize_reset_others_pin *
|
||||
|
@ -1,3 +1,4 @@
|
||||
CATCH _ flag_account_authorized 0
|
||||
LOAD retrieve_blocked_number 0
|
||||
MAP retrieve_blocked_number
|
||||
LOAD reset_others_pin 6
|
||||
|
Loading…
Reference in New Issue
Block a user