Custom App For Report (Tracker)

Dear Experts,

I hope that you are fine and healthy, I have developed a custom application used Javascript , Bootstrap , JQuery & Html for Reports. I used a saperate username and password for that when I give access to this app then login from another user. it is showing the app but I have a credential problem. when select back button comes dhis2 dashboard it is loged the username which I used in Custom App.

Thank you
Mohammad Ayub Yousafzai
kabul , Afghanistan

Hi @mohammadayub864

What version of DHIS2 are you testing your app in?

If I understand correctly, here’s the scenario:

  1. login using Admin account

  2. Install the app (CustomApp) and give another user (testUsername) access to the app

  3. Logout of the Admin account

  4. Login using testUsername account

  5. Open the CustomApp

  6. Click the return/back button on the browser

  7. user is no longer testUsername the user now is the Admin account?

Is this what’s happening? Are you able to reproduce this issue in any of the play.dhis2.org instances?

Thanks!

It is latest version of DHIS2 and You are 100% right , What is the solution?

Hi @mohammadayub864

It’s not clear how it’s even possible to switch between the testUsername into Admin without having to go through the login screen first. I can’t reproduce the issue. Maybe if you’d help me reproduce this on play, I could triage to the developers.

Thanks!

Dear @Gassim ,

I hope this message finds you well, Sorry for late reply I have already solved this issue. the problem was I had used credentials in JavaScript App.

The Solution is when ever you want to install the Custom JavaScript or React App in Dhis2 Platform. We should not use any credentials because it is taking credentials from who is logged.

Regards
Mohammad Ayub Yousafzai
Kabul, Afghanistan

1 Like