What data do online users see?

When setting up a user role, there is a tickbox to specify whether or not the role will be “Offline” and underneath it says:

Users with offline access can view and update documents without an internet connection and can only view a portion of the data. Online users can access all documents but must have an internet connection at all times.

Does that mean online users with that role will see all data above and below them in the hierarchy? Just below? Or is there some level of configurability?

Let’s say you have a hierarchy that looks like this…

Hospital
– Clinic
---- CHW Area
------ Household

…and an online user associated to a contact at the Clinic level.

What should that user be able to see?

I’ve checked out the documentation for Users, .roles, and .replication_depth (though the name doesn’t suggest it would apply to Online users).

Hi @michael

Online users can see every document in the database. Above, below, without limitation.
They are still subject to roles about how the webapp behaves (as long as they are not db admins), but in terms of access to data, there are no limitations.

Is your question rather about what the user “sees” in the webapp?

Thanks @diana … I was particularly interested in understanding what Contacts/Places they would see from the People tab. I was testing this on demo-cht.dev with an online user at the CHW Area level and there were so many households (since it shows households for all CHW Areas) that I “lazily loaded” for like 10 minutes and never reached the bottom so didn’t know what all was going to be shown on the LHS. But then I set up an online user one level above and it was clear what to expect.

On the LHS it showed the place I am associated to and then all the places one level below me. When I searched for something at the same level as me or higher, it showed up in the search results… and when I exported, it exported everything (above, below, and sideways) as well.

Thanks, I know what to expect now.

Hi @michael

On the LHS it showed the place I am associated to and then all the places one level below me.

Correct. Couldn’t have put it better myself :slight_smile:

Also, if the user is not associated to a place, places of the highest level are displayed in the contacts list.

1 Like

@diana, just noted last week that our CHWs in the same CHW Area can see all the households, trying to figure out why, any ideas? This is an offline role

Hi @oyierphil

Do you mean that CHWs can see households that belong to other CHW areas than the one they are assigned to?

@diana, yes, spot on

Hi @oyierphil

If you login with one of these users on another device, do you still see all households?
The only explanation I have right now is that the users are actually online.

@diana, the CHW is an offline user as shown in the config below:

“roles”:{
“data_entry”:{
“name”:“usertype.data_entry”
},
“analytics”:{
“name”:“usertype.analytics”
},
“gateway”:{
“name”:“usertype.gateway”
},
“program_officer”:{
“name”:“usertype.program_officer”
},
“national_admin”:{
“name”:“usertype.national_admin”
},
“county_focal_person”:{
“name”:“usertype.county_focal_person”
},
“subcounty_focal_person”:{
“name”:“usertype.subcounty_focal_person”
},
“chw_supervisor”:{
“name”:“usertype.chw_supervisor”,
“offline”:true
},
“chw”:{
“name”:“usertype.chw”,
“offline”:true
},
“health_worker”:{
“name”:“usertype.health_worker”,
“offline”:true
}
},
“permissions”:{
“can_access_gateway_api”:[
“gateway”
],
“can_bulk_delete_reports”:[
“national_admin”,
“program_officer”
],
“can_configure”:[
“national_admin”,
“program_officer”
],
“can_create_people”:[
“national_admin”,
“program_officer”,
“chw_supervisor”,
“health_worker”,
“chw”
],
“can_create_places”:[
“national_admin”,
“program_officer”,
“chw_supervisor”,
“health_worker”,
“chw”
],
“can_create_records”:[
“national_admin”,
“program_officer”,
“data_entry”,
“gateway”,
“chw_supervisor”,
“health_worker”,
“chw”
],
“can_create_users”:[
“national_admin”,
“program_officer”
],
“can_delete_contacts”:[
“national_admin”,
“program_officer”
],
“can_delete_messages”:[
“national_admin”,
“program_officer”
],
“can_delete_reports”:[
“national_admin”,
“program_officer”
],
“can_delete_users”:[
“national_admin”,
“program_officer”
],
“can_edit”:[
“national_admin”,
“program_officer”,
“gateway”,
“program_officer”,
“chw_supervisor”,
“health_worker”,
“chw”
],
“can_edit_profile”:[
“national_admin”,
“county_focal_person”,
“subcounty_focal_person”,
“program_officer”,
“chw_supervisor”,
“health_worker”
],
“can_edit_verification”:[
“national_admin”,
“program_officer”
],
“can_export_all”:[
“national_admin”,
“program_officer”
],
“can_export_audit”:[
“national_admin”,
“program_officer”
],
“can_export_contacts”:[
“national_admin”,
“program_officer”,
“county_focal_person”,
“subcounty_focal_person”,
“chw_supervisor”
],
“can_export_feedback”:[
“national_admin”,
“program_officer”
],
“can_export_forms”:[
“national_admin”,
“analytics”,
“program_officer”,
“county_focal_person”,
“subcounty_focal_person”
],
“can_export_messages”:[
“national_admin”,
“analytics”,
“program_officer”,
“subcounty_focal_person”,
“chw_supervisor”
],
“can_log_out_on_android”:[
“national_admin”,
“program_officer”,
“gateway”
],
“can_update_messages”:[
“national_admin”,
“gateway”,
“program_officer”
],
“can_update_people”:[
“national_admin”,
“program_officer”
],
“can_update_places”:[
“national_admin”,
“program_officer”,
“chw_supervisor”,
“health_worker”,
“chw”
],
“can_update_reports”:[
“national_admin”,
“program_officer”,
“chw_supervisor”,
“health_worker”,
“chw”
],
“can_update_users”:[
“national_admin”,
“program_officer”
],
“can_verify_reports”:[
“national_admin”,
“program_officer”,
“chw_supervisor”
],
“can_view_analytics”:[
“national_admin”,
“analytics”,
“program_officer”,
“subcounty_focal_person”,
“county_focal_person”,
“chw_supervisor”
],
“can_view_analytics_tab”:[
“national_admin”,
“program_officer”,
“subcounty_focal_person”,
“county_focal_person”,
“chw_supervisor”
],
“can_view_call_action”:[
“national_admin”,
“program_officer”,
“county_focal_person”,
“subcounty_focal_person”,
“chw_supervisor”
],
“can_view_contacts”:[
“national_admin”,
“program_officer”,
“chw_supervisor”,
“chw”,
“health_worker”
],
“can_view_contacts_tab”:[
“national_admin”,
“program_officer”,
“chw_supervisor”,
“chw”,
“health_worker”
],
“can_view_data_records”:[
“national_admin”,
“analytics”,
“gateway”,
“program_officer”,
“chw_supervisor”
],
“can_view_last_visited_date”:[

  ],
  "can_view_message_action":[
     
  ],
  "can_view_messages":[
     
  ],
  "can_view_messages_tab":[
     
  ],
  "can_view_outgoing_messages":[
     
  ],
  "can_view_reports":[
     "national_admin",
     "program_officer",
     "chw_supervisor"
  ],
  "can_view_reports_tab":[
     "national_admin",
     "program_officer",
     "chw_supervisor"
  ],
  "can_view_tasks":[
     "program_officer",
     "chw_supervisor"
  ],
  "can_view_tasks_tab":[
     "program_officer",
     "chw_supervisor"
  ],
  "can_view_unallocated_data_records":[
     "national_admin",
     "gateway",
     "program_officer",
     "chw_supervisor"
  ],
  "can_view_users":[
     "national_admin",
     "program_officer"
  ],
  "can_write_wealth_quintiles":[
     "program_officer"
  ],
  "can_aggregate_targets":[
     "chw_supervisor"
  ]

},
“changes_controller”:{
“reiterate_changes”:true,
“changes_limit”:100,
“debounce_interval”:200
},
“replication_depth”:[
{
“role”:“chw_supervisor”,
“depth”:1,
“report_depth”:1
},
{
“role”:“chw”,
“depth”:3
},
{
“role”:“health_worker”,
“depth”:1,
“report_depth”:1
}
],
“contact_types”:[
{
“id”:“national_office”,
“name_key”:“contact.type.national_office”,
“group_key”:“contact.type.national_office.plural”,
“create_key”:“contact.type.national_office.new”,
“edit_key”:“contact.type.place.edit”,
“primary_contact_key”:“national_office.field.contact”,
“icon”:“medic-national”,
“create_form”:“form:contact:national_office:create”,
“edit_form”:“form:contact:national_office:edit”
},
{
“id”:“county_office”,
“name_key”:“contact.type.county_office”,
“group_key”:“contact.type.county_office.plural”,
“create_key”:“contact.type.county_office.new”,
“edit_key”:“contact.type.place.edit”,
“primary_contact_key”:“county_office.field.contact”,
“parents”:[
“national_office”
],
“icon”:“medic-county”,
“create_form”:“form:contact:county_office:create”,
“edit_form”:“form:contact:county_office:edit”
},
{
“id”:“subcounty_office”,
“name_key”:“contact.type.subcounty_office”,
“group_key”:“contact.type.subcounty_office.plural”,
“create_key”:“contact.type.subcounty_office.new”,
“edit_key”:“contact.type.place.edit”,
“primary_contact_key”:“subcounty_office.field.contact”,
“parents”:[
“county_office”
],
“icon”:“medic-county”,
“create_form”:“form:contact:subcounty_office:create”,
“edit_form”:“form:contact:subcounty_office:edit”
},
{
“id”:“link_facility”,
“name_key”:“contact.type.link_facility”,
“group_key”:“contact.type.link_facility.plural”,
“create_key”:“contact.type.link_facility.new”,
“edit_key”:“contact.type.place.edit”,
“primary_contact_key”:“link_facility.field.contact”,
“parents”:[
“subcounty_office”
],
“icon”:“icon-places-hospital”,
“create_form”:“form:contact:link_facility:create”,
“edit_form”:“form:contact:link_facility:edit”
},
{
“id”:“chw_area”,
“name_key”:“contact.type.chw_area”,
“group_key”:“contact.type.chw_area.plural”,
“create_key”:“contact.type.chw_area.new”,
“edit_key”:“contact.type.chw_area.edit”,
“primary_contact_key”:“chw_area.field.contact”,
“parents”:[
“link_facility”
],
“icon”:“medic-chw-area”,
“create_form”:“form:contact:chw_area:create”,
“edit_form”:“form:contact:chw_area:edit”
},
{
“id”:“household”,
“name_key”:“contact.type.household”,
“group_key”:“contact.type.household.plural”,
“create_key”:“contact.type.household.new”,
“edit_key”:“contact.type.household.edit”,
“primary_contact_key”:“household.field.contact”,
“parents”:[
“chw_area”
],
“icon”:“icon-places-household”,
“create_form”:“form:contact:household:create”,
“edit_form”:“form:contact:household:edit”
},
{
“id”:“suspected_case”,
“name_key”:“contact.type.suspected_case”,
“group_key”:“contact.type.suspected_case.plural”,
“create_key”:“contact.type.suspected_case.new”,
“edit_key”:“contact.type.place.edit”,
“primary_contact_key”:“suspected_case.field.contact”,
“parents”:[
“household”,
“link_facility”,
“health_worker”,
“chw_supervisor”,
“national_office”
],
“icon”:“medic-covid-suspect”,
“create_form”:“form:contact:suspected_case:create”,
“edit_form”:“form:contact:suspected_case:edit”,
“count_visits”:true
},
{
“id”:“national_officer”,
“name_key”:“contact.type.national_officer”,
“group_key”:“contact.type.national_officer.plural”,
“create_key”:“contact.type.national_officer.new”,
“edit_key”:“contact.type.national_officer.edit”,
“primary_contact_key”:“national_officer.field.contact”,
“parents”:[
“national_office”
],
“icon”:“medic-health-worker”,
“create_form”:“form:contact:national_officer:create”,
“edit_form”:“form:contact:national_officer:edit”,
“person”:true
},
{
“id”:“county_focal_person”,
“name_key”:“contact.type.county_focal_person”,
“group_key”:“contact.type.county_focal_person.plural”,
“create_key”:“contact.type.county_focal_person.new”,
“edit_key”:“contact.type.county_focal_person.edit”,
“primary_contact_key”:“county_focal_person.field.contact”,
“parents”:[
“county_office”
],
“icon”:“medic-health-worker”,
“create_form”:“form:contact:county_focal_person:create”,
“edit_form”:“form:contact:county_focal_person:edit”,
“person”:true
},
{
“id”:“subcounty_focal_person”,
“name_key”:“contact.type.subcounty_focal_person”,
“group_key”:“contact.type.subcounty_focal_person.plural”,
“create_key”:“contact.type.subcounty_focal_person.new”,
“edit_key”:“contact.type.subcounty_focal_person.edit”,
“primary_contact_key”:“subcounty_focal_person.field.contact”,
“parents”:[
“subcounty_office”
],
“icon”:“medic-health-worker”,
“create_form”:“form:contact:subcounty_focal_person:create”,
“edit_form”:“form:contact:subcounty_focal_person:edit”,
“person”:true
},
{
“id”:“chw_supervisor”,
“name_key”:“contact.type.chw_supervisor”,
“group_key”:“contact.type.chw_supervisor.plural”,
“create_key”:“contact.type.chw_supervisor.new”,
“edit_key”:“contact.type.chw_supervisor.edit”,
“primary_contact_key”:“chw_supervisor.field.contact”,
“parents”:[
“link_facility”
],
“icon”:“medic-health-worker”,
“create_form”:“form:contact:chw_supervisor:create”,
“edit_form”:“form:contact:chw_supervisor:edit”,
“person”:true
},
{
“id”:“health_worker”,
“name_key”:“contact.type.health_worker”,
“group_key”:“contact.type.health_worker.plural”,
“create_key”:“contact.type.health_worker.new”,
“edit_key”:“contact.type.health_worker.edit”,
“primary_contact_key”:“health_worker.field.contact”,
“parents”:[
“link_facility”
],
“icon”:“health_worker”,
“create_form”:“form:contact:health_worker:create”,
“edit_form”:“form:contact:health_worker:edit”,
“person”:true
},
{
“id”:“chw”,
“name_key”:“contact.type.chw”,
“group_key”:“contact.type.chw.plural”,
“create_key”:“contact.type.chw.new”,
“edit_key”:“contact.type.chw.edit”,
“primary_contact_key”:“chw.field.contact”,
“parents”:[
“chw_area”
],
“icon”:“medic-health-worker”,
“create_form”:“form:contact:chw:create”,
“edit_form”:“form:contact:chw:edit”,
“person”:true
}
],

Hi @oyierphil

Can you please share an example username (can be done in private) for one of the users that you are observing this issue in?

Thanks!

@diana, shared, thank you

Discussing in private, we’ve concluded that the confusion was about which contacts offline users can see. By “all households”, @oyierphil did not mean all households on the server, but households with the user’s parent facility that were created by other users.

2 Likes