medic / cht-user-management

GNU Affero General Public License v3.0
3 stars 1 forks source link

CHP replacement - Hide/delete all information for outgoing CHPs instead of keeping the contact #48

Closed kennsippell closed 4 months ago

kennsippell commented 5 months ago

as the new CHP, this is very confusing. Is it possible to hide the 'name of the old CHP' from the UI using a similar approach to the way we hide names of the deceased HHs members under the Deceased Card?

I agree with

1 on @katanu response. It is better to hide the name of the old CHW.

https://github.com/moh-kenya/config-echis-2.0/issues/1858#issuecomment-1916115050

jonathanbataire commented 5 months ago

@kennsippell How are user credentials handled when replacing for UG deployement MoH requires that no user credentials should be deleted so we have a user role - "deactivated" that we assign to users we want to remove from the system the role has no permissions attached to it

kennsippell commented 5 months ago

@jonathanbataire Super interesting. Thanks for sharing.

Currently, the tool does the same thing that happens when you click "delete" (this red button in CHT). image

This does the following:

  1. Deletes the user doc in _users database
  2. Does not delete the user-settings doc in medic database
  3. Adds inactive: true flag onto user-settings doc

So the user isn't currently "deleted" per se. Would this work for Uganda users? Can I ask the goal of the deactivated role?

jonathanbataire commented 5 months ago

@jonathanbataire Super interesting. Thanks for sharing.

Currently, the tool does the same thing that happens when you click "delete" (this red button in CHT). image

This does the following:

  1. Deletes the user doc in _users database
  2. Does not delete the user-settings doc in medic database
  3. Adds inactive: true flag onto user-settings doc

So the user isn't currently "deleted" per se. Would this work for Uganda users? Can I ask the goal of the deactivated role?

I see, the requirement here is to be able to restore the user's access if needed in other words reactivate the account are we able to reactivate the account if we "delete" the doc in _users? and without changing the password?

kennsippell commented 4 months ago

@jonathanbataire No, we would not be able to reactivate the account. The _users doc is deleted and therefore the password is lost. We would need to recreate the user with a new password.

christinawere commented 4 months ago

@kennsippell I have just had a conversation with @tabithambui, the DCH MoH Design Lead and M&E, and she is in agreement with the idea of not having the previous contact information shown in the UI because it is of no use to the current user. If the historical information can be stored at the backend, that's fine.