You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once the user has granted or denied the challenge the result needs to be emitted out to listening parties. The emission of this event is currently being done as part of the evaluation process once all challenges have succeeded or at the point of the first error.
This is working in the success case, however when trying to emit the CapEvent::OnRevoked event a success payload is produced. The payload for the event is produced in the [get_cap_info](https://github.com/rdkcentral/Ripple/blob/main/core/main/src/state/cap/cap_state.rs#L201) function in the cap_state module where the currently store grant state is checked. As the grant state has not yet been updated to store the denied challenges the payload produced is a success payload.
This should be addressed by moving the event emission over to the check_with_roles function in the user_grants module. At this point in time the grant state and privacy settings will have been updated appropriately and the correct payload should be produced.
When addressing this issue we need to ensure the correct unit test cases are in place so that we are certain it has been solved and to protect us from regressions.
The text was updated successfully, but these errors were encountered:
Evaluating the user grants for a given capability is currently performed in the user_grants module evaluate_options function: https://github.com/rdkcentral/Ripple/blob/main/core/main/src/service/user_grants.rs#L890
Once the user has granted or denied the challenge the result needs to be emitted out to listening parties. The emission of this event is currently being done as part of the evaluation process once all challenges have succeeded or at the point of the first error.
This is working in the success case, however when trying to emit the
CapEvent::OnRevoked
event a success payload is produced. The payload for the event is produced in the[get_cap_info](https://github.com/rdkcentral/Ripple/blob/main/core/main/src/state/cap/cap_state.rs#L201)
function in thecap_state
module where the currently store grant state is checked. As the grant state has not yet been updated to store the denied challenges the payload produced is a success payload.This should be addressed by moving the event emission over to the
check_with_roles
function in theuser_grants
module. At this point in time the grant state and privacy settings will have been updated appropriately and the correct payload should be produced.When addressing this issue we need to ensure the correct unit test cases are in place so that we are certain it has been solved and to protect us from regressions.
The text was updated successfully, but these errors were encountered: