Uploaded image for project: 'Legacy UI Module'
  1. Legacy UI Module
  2. LUI-102

Hide concept stats in conceptSidebar if not allowed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Must
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.1
    • Labels:
      None

      Description

      conceptForm.jsp includes conceptSidebar.jsp and only requires privilege "Manage Concepts"

      see

      https://github.com/openmrs/openmrs-module-legacyui/blob/master/omod/src/main/webapp/admin/dictionary/conceptForm.jsp#L3

      but if a user wants to access an existing concept via this page, he does also need privileges

      • Get Forms
      • Get Observations
      • Get Patient Programs

      for the conceptSidebar.jsp which fetches stats about the concept usage in the Obs.

      So if the user does not have one of those listed privileges the page wont fully load since an APIAuthenticationException is thrown due to the missing privileges for accessing Obs services.

      This behavior is weird since the user is allowed to "Manage Concepts" so he should see the concept he was able to lookup.

      He should simply not see the concept stats/usage in obs.

      Proposing solution:

      Add a hasPrivilege tag around the concept sidebar portion concerned with showing the stats:

      https://github.com/openmrs/openmrs-module-legacyui/blob/master/omod/src/main/webapp/dictionary/conceptSidebar.jsp#L19-L67

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                teleivo Ivo Ulrich
                Reporter:
                teleivo Ivo Ulrich
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: