Event program with read only fields for a group


I’m struggling with the following event program case. There are 5 dataelements in total, with the following group access:

  • GroupA (Managers) → Write access to 5 total data elements.
  • GroupB (Workers)-> Write access to 3 of the data elements, Read access for the other 2 data elements.

I’have tried with different sharing settings in the data elements (the 2 datalements readonly access to GroupB) but the event program bypasses this security. GroupB can write to the 5 dataelements without any problem. Why does it happen?

How can I accomplish this requirement?

Thanks a lot.

Hi @kfeina

What dhis2 version is your instance? Is there a chance you share the steps to reproduce this? Thanks!


I created a small test in: DHIS 2 Demo - Sierra Leone

1- Data Elements Created (only two to simplify):

  • Managers_Write_Only
    • Sharing Settings → Manager (Can edit and view), Worker (Can view only)
  • Managers_and_Workers_Write
    • Sharing Settings → Manager (Can edit and view), Worker (Can edit and view)

2- Program is called Manager_Worker:

  • Ddata elements in: Managers_Write_Only, Managers_and_Workers_Write.
  • Sharing Settings:
    • Manager (Can edit and view + Can Capture and View)
    • Worker (Can edit and view + Can capture and view). It must have capture enabled, at least to be able to capture Managers_and_Workers_Write data element.

3- Users created to test:

  • user: Manager / password: Manager1$ (Role → Managers)
  • user: Worker / password: Worker1$ (Role → Workers)

Access url: DHIS 2 Demo - Sierra Leone

To test the program login as Worker, go to the capture app, select program Manager_Worker, OU → Ngelehun CHC and Worker will be able to write to both fields.

Thanks a lot for your time.

To the best of my knowledge, for this to work you’d need to have the two data elements separated into different stages. Giving the worker the right in the stage to capture will grant them the right to capture for all DE [will double check with @tracker-analytics]



I understand what you mean, but event programs don’t have stages, so it is not possible this way.

Any ideas?

Thanks a lot.

You are right! We need a best practice advice on how to approach this issue.

There is one way which I’m sure is doable using program rules which is to ask the question: Are you a manager? And if the person answers yes then to make the data element field appear, but if the answer is no is to hide the field.