Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BAH-4045 | Add. Privilege for getting program attribute types #272

Merged
merged 3 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions bahmnicore-omod/src/main/resources/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@
<name>app:lab-lite</name>
<description>Will give access to Lab Lite app</description>
</privilege>
<privilege>
<name>Get Patient Program Attribute Types</name>
<description>Ability to get program attribute types</description>
</privilege>

<advice>
<point>org.openmrs.module.bahmniemrapi.encountertransaction.service.BahmniEncounterTransactionService</point>
Expand Down
18 changes: 18 additions & 0 deletions bahmnicore-omod/src/main/resources/liquibase.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4682,5 +4682,23 @@
<comment>Update the wards list sql to optimize for MySQL 8 - Bahmni Standard 1.0</comment>
<sqlFile path="V1_99_WardsListSql.sql"/>
</changeSet>
<changeSet id="BAH-4045-add-privilege-to-clinical-app-readonly" author="Bahmni">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would advise moving that to app config and through initializer.

<preConditions onFail="MARK_RAN">
<sqlCheck expectedResult="1">
select count(*) from privilege where privilege='Get Patient Program Attribute Types';
</sqlCheck>
<sqlCheck expectedResult="1">
select count(*) from role where role='Clinical-App-Read-Only';
</sqlCheck>
<sqlCheck expectedResult="0">
select count(*) from role_privilege where role='Clinical-App-Read-Only' and privilege='Get Patient Program Attribute Types';
</sqlCheck>
</preConditions>
<comment> Adds Get Patient Program Attribute Types privilege to Clinical-App Read Only role </comment>
<insert tableName="role_privilege">
<column name="role">Clinical-App-Read-Only</column>
<column name="privilege">Get Patient Program Attribute Types</column>
</insert>
</changeSet>

</databaseChangeLog>
Loading