Help needed: Role authorities getting removed automatically

Hi all.

I received complaints from my users that they are not able to see their dashboards. I analysed and found that their authority to “View Event Analytics” is not there and I added it. After a couple of days, I received the same complaint and I found the same issue. And, again the same complaint and same issue. I realised that the following authorities have been removed automatically from all user roles every now and then.

Add/Update Enrollment, Read Enrollment, Add/Update Tracked Entity Data Value,
Delete Tracked Entity Data Value, Read Tracked Entity Data Value, Add/Update Tracked Entity Instance, Delete Tracked Entity Instance, Search Tracked Entity Instance, View Event Analytics

Is there anything I need to do to fix this (or) is this a bug? Please assist.

We use DHIS2 2.29, Build 0b4de69

2 Likes

Hi @MSP,

Sorry about that;

Do you have another admin that might have edited your account? (In a previous version - 2.25, this was an issue when another admin edits your account; but I know it was fixed on the later versions)

Does this happen after restarting your server?

I have seen on Jira @Lars and @viet have been working on similar fixes on the same version [DHIS2-4462] - Jira; I’m sure they will shed more light on this.

Best,
James.

1 Like

Hi @jomutsani,

No. We have one more Admin but he is not working on this project currently.

On the note of restarting the server, it could be. Yesterday we had a power cut and had to restart the server today morning. I can safely say the last time we had this issue, we might have restarted the server due to power cuts. However, I could not remember clearly whether we restarted the server in the other past instances.

2 Likes

Hi @MSP,

to my knowledge there is no processes in the DHIS2 software that would alter user authorities automatically. The only thing it could be in DHIS2 would be the automatic upgrade-script, which is run each time you start the software. However I cant find any mention of the dashboard authority in those files. Could to confirm whether or not this issue happens without restarting the server?

Other issues than DHIS2 software can be, similar to what @jomutsani already mentioned, is that another user with sufficient privileges are making changes without your knowledge.

Other scenarios than these might be even more unlikely, like your database getting reset (Maybe you have some automated backup/restoration scripts?).

2 Likes

Hi @Stian and @jomutsani.

Thanks for your responses. Ours is a new project and is live for the past about 6 months. Hence we don’t have anything else such as restore scripts in place as on now. And no one is making changes to roles since we all know that it will bounce back to us :wink:.

Let me observe the trend of this issue for a couple more times and update.

2 Likes

One last thing you can try out @MSP, when you give them the authorities, are they actually being granted, or maybe it fails but you don’t notice until later?

2 Likes

Hi @Stian,

#1. When I grant the authorities, they are given and it works until I hear the complaint from the users.
#2. Yesterday we had another big power cut for about 6 hours and the server went down after the UPS ran out of power. Then we had to restart the server today morning. After restarting, I checked the user roles and, YES, I found that the authorities I mentioned above got removed.

So, I guess DHIS2 removes “those” authorities when restarted after a power failure/crash.

2 Likes

Today again the same issue happened. Any update from DHIS2 team? I am curious to know when this issue will be fixed.

2 Likes

Hi @MSP,

Did you get to explore and recheck if your system has any automated backup/restoration scripts as @Stian had pointed out? this might be a cause

Best,
James.

1 Like

Hi @jomutsani

Guess you missed to see my previous reply. We don’t have any such scripts.

1 Like

Hi @MSP,

Sorry had missed out on that - DId you manage to find what the issue was here with user authorities being removed automatically?

Best,
James.

1 Like

Hi @MSP

Please see the following topic on the community where I was also experiencing this same issue.

@Markus provided the solution in this chain that helped me resolve the issue on my side.

3 Likes

Sorry. The issue persists. And @Terence_Scott fix is on DHIS2 2.30 whereas we are using 2.29.

2 Likes

Sorry about that @MSP.

Hi @Markus - Is the team able to work on this fix for version 2.29 or our brother @MSP has to upgrade to atleast version 2.30 for him not to experience this - kindly advise.

@MSP - I would also recommed you start thinking of upgrading to version 2.30 or higher since most of the fixes have already been incorporated on the higher versions builds.

Best,
James.

1 Like

Thanks @jomutsani for the advise. We have scheduled the upgrade in May which is our non-peak period. In fact, we don’t want to hurry with the upgrade without knowing the pros and cons.

2 Likes

That’s good news @MSP! You can also have the version you want running on a test server for the time being as you monitor before finally upgrading to the main.

Best,
James.

1 Like