...
As mentioned in Access Control In OpenMRS, OpenMRS usesRole Based Access Control (RBAC) for access control. An important part for this access control is checking if the user has the required privilege(s). In OpenMRS, talking to the database is done through services. The following diagram describes the privilege checking procedure:
NOTE: This is just a general overview, some methods do further privilege checking.
...