← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16963: Add more authorities for TrackedEntityForm

 

------------------------------------------------------------
revno: 16963
committer: Tran Chau<tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-10-06 19:00:42 +0700
message:
  Add more authorities for TrackedEntityForm
modified:
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/viewTrackedEntityForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties


--
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-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java	2014-10-04 15:48:07 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java	2014-10-06 12:00:42 +0000
@@ -295,7 +295,8 @@
         updateProgramAttributeList();
         
         updateFixedAttributeInCaseAggregate( "DEDATEDIFF", CaseAggregationCondition.MINUS_OPERATOR );
-        
+        executeSql( "update userroleauthorities set authority='F_ADD_TRACKED_ENTITY_FORM' where authority='F_TRACKED_ENTITY_FORM_ADD'" );
+
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties	2014-10-06 10:11:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties	2014-10-06 12:00:42 +0000
@@ -504,4 +504,5 @@
 enter_a_key = Enter a key
 date_diff = Date diff
 program_stage_sort_order = Program stage sort order
-sort_order = Sort order
\ No newline at end of file
+sort_order = Sort order
+tracked_entity_form = Tracked entity form
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/struts.xml	2014-10-06 10:11:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/struts.xml	2014-10-06 12:00:42 +0000
@@ -553,7 +553,7 @@
       <param name="page">/dhis-web-maintenance-program/trackedEntityForm.vm</param>
       <param name="menu">/dhis-web-maintenance-program/menu.vm</param>
       <param name="javascripts">javascript/trackedEntityForm.js</param>
-      <param name="requiredAuthorities">F_ADD_TRACKED_ENTITY_FORM</param>
+      <param name="requiredAuthorities">F_TRACKED_ENTITY_FORM_MANAGEMENT</param>
     </action>
 
     <action name="viewTrackedEntityForm"
@@ -566,12 +566,14 @@
         javascript/viewTrackedEntityForm.js
       </param>
       <param name="stylesheets">style/basic.css</param>
+      <param name="requiredAuthorities">F_TRACKED_ENTITY_FORM_ADD</param>
     </action>
 
     <action name="saveTrackedEntityForm"
       class="org.hisp.dhis.trackedentity.action.dataentryform.SaveTrackedEntityFormAction">
       <result name="success" type="redirect">trackedEntityForm.action
       </result>
+      <param name="requiredAuthorities">F_TRACKED_ENTITY_FORM_ADD</param>
     </action>
 
     <action name="autoSaveTrackedEntityForm"
@@ -579,6 +581,7 @@
       <result name="success" type="velocity-json">
         /dhis-web-commons/ajax/jsonResponseSuccess.vm
       </result>
+      <param name="requiredAuthorities">F_TRACKED_ENTITY_FORM_ADD</param>
     </action>
 
     <action name="removeDataEntryForm"
@@ -592,6 +595,7 @@
       class="org.hisp.dhis.trackedentity.action.dataentryform.RemoveTrackedEntityFormAction">
       <result name="success" type="redirect">trackedEntityForm.action
       </result>
+      <param name="requiredAuthorities">F_TRACKED_ENTITY_FORM_DELETE</param>
     </action>
 
     <action name="showTrackedEntityForm"
@@ -599,6 +603,7 @@
       <result name="success" type="velocity">
         /dhis-web-maintenance-program/dataEntryFormCode.vm
       </result>
+      <param name="requiredAuthorities">F_TRACKED_ENTITY_FORM_ADD</param>
     </action>
 
     <action name="setAutoSaveTrackedEntityFormSetting"
@@ -606,6 +611,7 @@
       <result name="success" type="velocity-json">
         ../dhis-web-commons/ajax/jsonResponseSuccess.vm
       </result>
+      <param name="requiredAuthorities">F_TRACKED_ENTITY_FORM_ADD</param>
     </action>
 
     <!-- Tracked Entity Attribute Group -->

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/viewTrackedEntityForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/viewTrackedEntityForm.vm	2014-06-26 21:14:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/viewTrackedEntityForm.vm	2014-10-06 12:00:42 +0000
@@ -57,8 +57,8 @@
 <input type="hidden" name="programId" id="programId" value="$!program.id"/>
 <input type="hidden" name="dataEntryFormId" id="dataEntryFormId" value="$!registrationForm.dataEntryForm.id"/>
 
-<h3>$i18n.getString( "tracked_entity_registration_form_manegement" )</h3>
-<h4>$!program.displayName</h4>
+<h3>$i18n.getString( "tracked_entity_form" )</h3>
+<h4>$program.displayName</h4>
 
 <div class="container" >
 	<table id="detailsList" width="100%">

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties	2014-09-12 14:17:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties	2014-10-06 12:00:42 +0000
@@ -155,7 +155,9 @@
 F_TRACKED_ENTITY_ATTRIBUTEVALUE_ADD=Add Tracked Entity Attribute Value
 F_ADD_PROGRAM_INDICATOR = Add/Update Program Indicator
 F_TRACKED_ENTITY_CHANGE_LOCATION = Change Tracked Entity Instance Location
-F_ADD_TRACKED_ENTITY_FORM=Add Tracked Entity Form
+F_TRACKED_ENTITY_FORM_MANAGEMENT = Tracked Entity Form Management
+F_TRACKED_ENTITY_FORM_ADD = Add Tracked Entity Form
+F_TRACKED_ENTITY_FORM_DELETE = Delete Tracked Entity Form
 F_PROGRAM_INSTANCE_MANAGEMENT = Program Event Management
 F_PROGRAM_INSTANCE_DELETE = Delete Program Enrollment
 F_PROGRAM_TRACKING_MANAGEMENT = Program Tracking Management