dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19045
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8156: [mobile] add more auth requirement for action and fix the NPE when add relationship
------------------------------------------------------------
revno: 8156
committer: Long <Long@Long-Laptop>
branch nick: dhis2
timestamp: Thu 2012-09-20 15:52:26 +0700
message:
[mobile] add more auth requirement for action and fix the NPE when add relationship
modified:
dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml 2012-09-20 08:35:03 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml 2012-09-20 08:52:26 +0000
@@ -79,6 +79,7 @@
<param name="page">/dhis-web-light/trackingMenu.vm</param>
<param name="requiredAuthorities">M_dhis-web-maintenance-patient</param>
</action>
+
<action name="selectNamebasedOrganisationUnit"
class="org.hisp.dhis.light.namebaseddataentry.action.GetNamebasedOrganisationUnitsAction">
<result name="redirect" type="redirect">/light/selectActivityType.action?orgUnitId=${orgUnitId}</result>
@@ -129,6 +130,7 @@
</result>
<result name="error" type="velocity">/dhis-web-light/main.vm</result>
<param name="page">/dhis-web-light/namebased/programStageForm.vm</param>
+ <param name="requiredAuthorities">F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_UPDATE,F_PATIENT_DATAVALUE_DELETE</param>
</action>
<action name="showBeneficiaryDetail"
@@ -180,8 +182,8 @@
<action name="addNewRelationship"
class="org.hisp.dhis.light.namebaseddataentry.action.AddNewRalationshipAction">
- <result name="redirect" type="redirect">showPatientProgramList.action?patientId=${originalPatientId}&validated=true
- </result>
+ <result name="redirect" type="redirect">showPatientProgramList.action?patientId=${originalPatientId}&validated=true</result>
+ <param name="requiredAuthorities">F_PATIENT_UPDATE</param>
</action>
<action name="showPatientProgramList"
@@ -206,6 +208,7 @@
class="org.hisp.dhis.light.namebaseddataentry.action.SaveRepeatableEventAction">
<result name="success" type="redirect">showPatientProgramStageList.action?patientId=${patientId}&programInstanceId=${programInstanceId}&programId=${programId}&validated=false
</result>
+ <param name="requiredAuthorities">F_PATIENT_UPDATE, F_PROGRAM_ENROLLMENT</param>
</action>
<action name="showPatientLocationForm"
@@ -217,6 +220,7 @@
<action name="registerPatientLocation"
class="org.hisp.dhis.light.namebaseddataentry.action.RegisterPatientLocationAction">
<result name="success" type="redirect">showPatientProgramList.action?patientId=${patientId}</result>
+ <param name="requiredAuthorities">F_PATIENT_UPDATE</param>
</action>
<!-- Beneficiary Registration -->
@@ -239,6 +243,7 @@
<result name="success" type="redirect">/light/showPatientProgramList.action?patientId=${patientId}</result>
<result name="error" type="velocity">/dhis-web-light/main.vm</result>
<param name="page">/dhis-web-light/registration/beneficiaryRegistrationForm.vm</param>
+ <param name="requiredAuthorities">F_PATIENT_ADD</param>
</action>
<!-- Beneficiary Enrollment -->
@@ -278,6 +283,7 @@
<result name="success" type="redirect">/light/showPatientProgramList.action?patientId=${patientId}</result>
<result name="error" type="velocity">/dhis-web-light/main.vm</result>
<param name="page">/dhis-web-light/enrollment/programEnrollmentForm.vm</param>
+ <param name="requiredAuthorities">F_PATIENT_UPDATE, F_PROGRAM_ENROLLMENT</param>
</action>
<!-- Single Event -->
@@ -307,6 +313,7 @@
</result>
<result name="error" type="velocity">/dhis-web-light/main.vm</result>
<param name="page">/dhis-web-light/singleevent/singleEventForm.vm</param>
+ <param name="requiredAuthorities">F_PATIENT_DATAVALUE_ADD,F_PATIENT_DATAVALUE_UPDATE,F_PATIENT_DATAVALUE_DELETE</param>
</action>
<!-- Reports -->
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm 2012-09-19 09:46:40 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/beneficiaryProgramList.vm 2012-09-20 08:52:26 +0000
@@ -93,7 +93,7 @@
<p>
<ul>
#foreach( $relationshipType in $relationshipTypes )
- <li><a href="showFindRelatedPatientForm.action?originalPatientId=$patient.id&relationshipTypeId=$relationshipType.id$orgUnitId=$patient.getOrganisationUnit().getId()">Add $relationshipType.getName()</a></li>
+ <li><a href="showFindRelatedPatientForm.action?originalPatientId=$patient.id&relationshipTypeId=$relationshipType.id&orgUnitId=$patient.getOrganisationUnit().getId()">Add $relationshipType.getName()</a></li>
#end
</ul>
</p>