← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17680: Introduced 4 new authorities realted to import and export: F_IMPORT_EVENTS, F_IMPORT_OTHER_SYSTEM...

 

------------------------------------------------------------
revno: 17680
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-12-08 21:51:34 +0200
message:
  Introduced 4 new authorities realted to import and export: F_IMPORT_EVENTS, F_IMPORT_OTHER_SYSTEMS, F_IMPORT_GML, F_EXPORT_EVENTS
modified:
  dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties
  dhis-2/dhis-web/dhis-web-importexport/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/index.vm
  dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/mainMenu.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-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties	2014-12-03 14:09:14 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties	2014-12-08 19:51:34 +0000
@@ -64,6 +64,7 @@
 organisation_unit_groups=Organisation unit groups
 organisation_unit_group_sets=Organisation unit group sets
 export_to_other_systems=Export to other systems
+import_from_other_systems=Import from other systems
 DHIS14_metadata_export=DHIS 1.4 Metadata Export
 DHIS14_data_export=DHIS 1.4 Data Export
 accept_incoming_records=Accept incoming records

=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/resources/struts.xml	2014-12-07 13:56:05 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/resources/struts.xml	2014-12-08 19:51:34 +0000
@@ -58,13 +58,13 @@
       <param name="page">/dhis-web-importexport/eventImportForm.vm</param>
       <param name="menu">/dhis-web-importexport/mainMenu.vm</param>
       <param name="javascripts">javascript/eventData.js</param>
-      <param name="requiredAuthorities">F_IMPORT_DATA</param>
+      <param name="requiredAuthorities">F_IMPORT_EVENTS</param>
     </action>
 
     <action name="importEvents" class="org.hisp.dhis.importexport.action.event.ImportEventAction">
       <result name="success" type="redirect">displayEventImportForm.action</result>
       <interceptor-ref name="fileUploadStack" />
-      <param name="requiredAuthorities">F_IMPORT_DATA</param>
+      <param name="requiredAuthorities">F_IMPORT_EVENTS</param>
     </action>
 
     <action name="getImportEventSummaries" class="org.hisp.dhis.importexport.action.event.GetImportEventSummariesAction">
@@ -79,7 +79,7 @@
       <param name="page">/dhis-web-importexport/eventExportForm.vm</param>
       <param name="menu">/dhis-web-importexport/mainMenu.vm</param>
       <param name="javascripts">javascript/eventData.js</param>
-      <param name="requiredAuthorities">F_EXPORT_DATA</param>
+      <param name="requiredAuthorities">F_EXPORT_EVENTS</param>
     </action>
 
     <!-- Menu -->
@@ -88,7 +88,7 @@
       <result name="success" type="velocity">/main.vm</result>
       <param name="page">/dhis-web-importexport/externalImportMenu.vm</param>
       <param name="menu">/dhis-web-importexport/mainMenu.vm</param>
-      <param name="requiredAuthorities">F_IMPORT_DATA</param>
+      <param name="requiredAuthorities">F_IMPORT_OTHER_SYSTEMS</param>
     </action>
 
     <action name="displayExternalExportMenu" class="org.hisp.dhis.importexport.action.NoAction">
@@ -111,7 +111,7 @@
       <param name="page">/dhis-web-importexport/importForm.vm</param>
       <param name="menu">/dhis-web-importexport/mainMenu.vm</param>
       <param name="javascripts">javascript/import.js,javascript/process.js</param>
-      <param name="requiredAuthorities">F_IMPORT_DATA</param>
+      <param name="requiredAuthorities">F_IMPORT_OTHER_SYSTEMS</param>
     </action>
 
     <action name="import" class="org.hisp.dhis.importexport.action.imp.ImportAction">
@@ -121,20 +121,20 @@
       <param name="menu">/dhis-web-importexport/mainMenu.vm</param>
       <param name="javascripts">javascript/import.js,javascript/process.js</param>
       <interceptor-ref name="fileUploadStack" />
-      <param name="requiredAuthorities">F_IMPORT_DATA</param>
+      <param name="requiredAuthorities">F_IMPORT_OTHER_SYSTEMS</param>
     </action>
 
     <action name="getImportStatus" class="org.hisp.dhis.importexport.action.imp.GetImportStatusAction">
       <result name="success" type="velocity-xml">/dhis-web-importexport/responseImportStatus.vm</result>
       <param name="onExceptionReturn">plainTextError</param>
-      <param name="requiredAuthorities">F_IMPORT_DATA</param>
+      <param name="requiredAuthorities">F_IMPORT_OTHER_SYSTEMS</param>
     </action>
 
     <action name="getImportAnalysis" class="org.hisp.dhis.importexport.action.imp.GetImportAnalysisAction">
       <result name="success" type="velocity">/main.vm</result>
       <param name="page">/dhis-web-importexport/importAnalysisForm.vm</param>
       <param name="menu">/dhis-web-importexport/mainMenu.vm</param>
-      <param name="requiredAuthorities">F_IMPORT_DATA</param>
+      <param name="requiredAuthorities">F_IMPORT_OTHER_SYSTEMS</param>
     </action>
 
     <!-- Object Ajax -->
@@ -143,14 +143,14 @@
       <result name="success" type="velocity-xml">/dhis-web-importexport/responseSuccess.vm</result>
       <result name="error" type="velocity-xml">/dhis-web-importexport/responseError.vm</result>
       <param name="onExceptionReturn">plainTextError</param>
-      <param name="requiredAuthorities">F_IMPORT_DATA</param>
+      <param name="requiredAuthorities">F_IMPORT_OTHER_SYSTEMS</param>
     </action>
 
     <action name="discardObjectsOfTypeAjax" class="org.hisp.dhis.importexport.action.object.DiscardObjectsOfTypeAction">
       <result name="success" type="velocity-xml">/dhis-web-importexport/responseSuccess.vm</result>
       <result name="error" type="velocity-xml">/dhis-web-importexport/responseError.vm</result>
       <param name="onExceptionReturn">plainTextError</param>
-      <param name="requiredAuthorities">F_IMPORT_DATA</param>
+      <param name="requiredAuthorities">F_IMPORT_OTHER_SYSTEMS</param>
     </action>
 
     <!-- Preview -->
@@ -160,7 +160,7 @@
       <param name="page">/dhis-web-importexport/previewForm.vm</param>
       <param name="menu">/dhis-web-importexport/mainMenu.vm</param>
       <param name="javascripts">javascript/import.js</param>
-      <param name="requiredAuthorities">F_IMPORT_DATA</param>
+      <param name="requiredAuthorities">F_IMPORT_OTHER_SYSTEMS</param>
     </action>
 
     <action name="displayMatchForm" class="org.hisp.dhis.importexport.action.imp.GetMatchOptionsAction">
@@ -168,7 +168,7 @@
       <param name="page">/dhis-web-importexport/matchToExistingForm.vm</param>
       <param name="menu">/dhis-web-importexport/mainMenu.vm</param>
       <param name="javascripts">javascript/import.js</param>
-      <param name="requiredAuthorities">F_IMPORT_DATA</param>
+      <param name="requiredAuthorities">F_IMPORT_OTHER_SYSTEMS</param>
     </action>
 
     <action name="displayCompareForm" class="org.hisp.dhis.importexport.action.imp.GetCompareOptionsAction">
@@ -176,17 +176,17 @@
       <param name="page">/dhis-web-importexport/compareToExistingForm.vm</param>
       <param name="menu">/dhis-web-importexport/mainMenu.vm</param>
       <param name="javascripts">javascript/import.js</param>
-      <param name="requiredAuthorities">F_IMPORT_DATA</param>
+      <param name="requiredAuthorities">F_IMPORT_OTHER_SYSTEMS</param>
     </action>
 
     <action name="importAllObjects" class="org.hisp.dhis.importexport.action.object.ImportAllObjectsAction">
       <result name="success" type="redirect">displayImportForm.action</result>
-      <param name="requiredAuthorities">F_IMPORT_DATA</param>
+      <param name="requiredAuthorities">F_IMPORT_OTHER_SYSTEMS</param>
     </action>
 
     <action name="discardAllObjects" class="org.hisp.dhis.importexport.action.object.DiscardAllObjectsAction">
       <result name="success" type="redirect">displayImportForm.action</result>
-      <param name="requiredAuthorities">F_IMPORT_DATA</param>
+      <param name="requiredAuthorities">F_IMPORT_OTHER_SYSTEMS</param>
     </action>
 
     <action name="matchObject" class="org.hisp.dhis.importexport.action.object.MatchObjectAction">
@@ -194,7 +194,7 @@
       <param name="page">/dhis-web-importexport/previewForm.vm</param>
       <param name="menu">/dhis-web-importexport/mainMenu.vm</param>
       <param name="javascripts">javascript/import.js</param>
-      <param name="requiredAuthorities">F_IMPORT_DATA</param>
+      <param name="requiredAuthorities">F_IMPORT_OTHER_SYSTEMS</param>
     </action>
 
     <action name="discardObject" class="org.hisp.dhis.importexport.action.object.DiscardObjectAction">
@@ -202,7 +202,7 @@
       <param name="page">/dhis-web-importexport/previewForm.vm</param>
       <param name="menu">/dhis-web-importexport/mainMenu.vm</param>
       <param name="javascripts">javascript/import.js</param>
-      <param name="requiredAuthorities">F_IMPORT_DATA</param>
+      <param name="requiredAuthorities">F_IMPORT_OTHER_SYSTEMS</param>
     </action>
 
     <!-- Export -->
@@ -288,11 +288,12 @@
       <param name="page">/dhis-web-importexport/configDhis14Form.vm</param>
       <param name="menu">/dhis-web-importexport/mainMenu.vm</param>
       <param name="javascripts">javascript/config.js</param>
-      <param name="requiredAuthorities">F_IMPORT_DATA</param>
+      <param name="requiredAuthorities">F_IMPORT_OTHER_SYSTEMS</param>
     </action>
 
     <action name="configDhis14" class="org.hisp.dhis.importexport.action.dhis14.SetDhis14ConfigurationAction">
       <result name="success" type="redirect">setImportFormat.action?importFormat=DHIS14FILE</result>
+      <param name="requiredAuthorities">F_IMPORT_OTHER_SYSTEMS</param>
     </action>
 
     <action name="validateConfigDhis14"
@@ -336,6 +337,7 @@
       <param name="strategy">update</param>
       <result name="success" type="redirect">gmlImport.action</result>
       <interceptor-ref name="fileUploadStack" />
+      <param name="requiredAuthorities">F_IMPORT_GML</param>
     </action>
 
     <action name="gmlImport" class="org.hisp.dhis.importexport.action.NoAction">
@@ -343,7 +345,7 @@
       <param name="menu">/dhis-web-importexport/mainMenu.vm</param>
       <param name="page">/dhis-web-importexport/gmlImport.vm</param>
       <param name="javascripts">javascript/importMetaData.js</param>
-      <param name="requiredAuthorities">F_METADATA_IMPORT</param>
+      <param name="requiredAuthorities">F_IMPORT_GML</param>
     </action>
 
     <!-- Detailed meta-data export -->

=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/index.vm'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/index.vm	2014-11-11 21:16:01 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/index.vm	2014-12-08 19:51:34 +0000
@@ -1,15 +1,34 @@
 <h3>$i18n.getString( "dhis-web-importexport" )</h3>
 
 <ul class="introList">
+	#if( $auth.hasAccess( "dhis-web-importexport", "dxf2MetaDataImport" ) )
     #introListImgItem( "dxf2MetaDataImport.action" "metadata_import" "import" )
+    #end
+    #if( $auth.hasAccess( "dhis-web-importexport", "displayImportDataValueForm" ) )
     #introListImgItem( "displayImportDataValueForm.action" "data_import" "import" )
+    #end
+    #if( $auth.hasAccess( "dhis-web-importexport", "gmlImport" ) )
     #introListImgItem( "gmlImport.action" "gml_import" "import" )
+    #end
+    #if( $auth.hasAccess( "dhis-web-importexport", "displayEventImportForm" ) )
     #introListImgItem( "displayEventImportForm.action" "event_import" "import" )
+    #end
+    #if( $auth.hasAccess( "dhis-web-importexport", "displayExternalImportMenu" ) )
     #introListImgItem( "displayExternalImportMenu.action" "dhis14_import" "import" )
-
+    #end
+    #if( $auth.hasAccess( "dhis-web-importexport", "dxf2MetaDataExport" ) )
     #introListImgItem( "dxf2MetaDataExport.action" "metadata_export" "export" )
+    #end
+    #if( $auth.hasAccess( "dhis-web-importexport", "dxf2FilteredMetaDataExport" ) )
     #introListImgItem( "dxf2FilteredMetaDataExport.action" "filtered_metadata_export" "export")
+    #end
+    #if( $auth.hasAccess( "dhis-web-importexport", "displayDataValueExportForm" ) )
     #introListImgItem( "displayDataValueExportForm.action" "data_export" "export" )
+    #end
+    #if( $auth.hasAccess( "dhis-web-importexport", "displayEventExportForm" ) )
     #introListImgItem( "displayEventExportForm.action" "event_export" "export" )
+    #end
+    #if( $auth.hasAccess( "dhis-web-importexport", "displayExternalExportMenu" ) )
     #introListImgItem( "displayExternalExportMenu.action" "export_to_other_systems" "export" )
+    #end
 </ul>

=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/mainMenu.vm'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/mainMenu.vm	2014-11-11 21:16:01 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/mainMenu.vm	2014-12-08 19:51:34 +0000
@@ -2,19 +2,39 @@
 <h2>$i18n.getString( "import" )&nbsp;</h2>
 
 <ul>
+  #if( $auth.hasAccess( "dhis-web-importexport", "dxf2MetaDataImport" ) )
   <li><a href="dxf2MetaDataImport.action">$i18n.getString( "metadata_import" )&nbsp;</a></li>
+  #end
+  #if( $auth.hasAccess( "dhis-web-importexport", "displayImportDataValueForm" ) )
   <li><a href="displayImportDataValueForm.action">$i18n.getString( "data_import" )&nbsp;</a></li>
+  #end
+  #if( $auth.hasAccess( "dhis-web-importexport", "gmlImport" ) )
   <li><a href="gmlImport.action">$i18n.getString( "gml_import" )&nbsp;</a></li>
+  #end
+  #if( $auth.hasAccess( "dhis-web-importexport", "displayEventImportForm" ) )
   <li><a href="displayEventImportForm.action">$i18n.getString( "event_import" )&nbsp;</a></li>
-  <li><a href="displayExternalImportMenu.action">$i18n.getString( "dhis14_import" )&nbsp;</a></li>
+  #end
+  #if( $auth.hasAccess( "dhis-web-importexport", "displayExternalImportMenu" ) )
+  <li><a href="displayExternalImportMenu.action">$i18n.getString( "import_from_other_systems" )&nbsp;</a></li>
+  #end
 </ul>
 
 <h2>$i18n.getString( "export" )&nbsp;</h2>
 
 <ul>
+  #if( $auth.hasAccess( "dhis-web-importexport", "dxf2MetaDataExport" ) )
   <li><a href="dxf2MetaDataExport.action">$i18n.getString( "metadata_export" )&nbsp;</a></li>
+  #end
+  #if( $auth.hasAccess( "dhis-web-importexport", "dxf2FilteredMetaDataExport" ) )
   <li><a href="dxf2FilteredMetaDataExport.action">$i18n.getString( "filtered_metadata_export" )&nbsp;</a></li>
+  #end
+  #if( $auth.hasAccess( "dhis-web-importexport", "displayDataValueExportForm" ) )
   <li><a href="displayDataValueExportForm.action">$i18n.getString( "data_export" )&nbsp;</a></li>
+  #end
+  #if( $auth.hasAccess( "dhis-web-importexport", "displayEventExportForm" ) )
   <li><a href="displayEventExportForm.action">$i18n.getString( "event_export" )&nbsp;</a></li>
+  #end
+  #if( $auth.hasAccess( "dhis-web-importexport", "displayExternalExportMenu" ) )
   <li><a href="displayExternalExportMenu.action">$i18n.getString( "export_to_other_systems" )&nbsp;</a></li>
+  #end
 </ul>

=== 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-12-04 15:32:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/org/hisp/dhis/user/i18n_module.properties	2014-12-08 19:51:34 +0000
@@ -254,9 +254,15 @@
 F_ATTRIBUTE_DELETE=Delete Attribute
 F_MANAGE_INTEGRATION_ROUTES=Manage integration routes
 F_IMPORT_DATA=Import data
+F_IMPORT_EVENTS=Import events
+F_IMPORT_OTHER_SYSTEMS=Import from other systems
+F_IMPORT_GML=Import GML
 F_EXPORT_DATA=Export data
+F_EXPORT_EVENTS=Export events
 F_METADATA_SUBSET_IMPORT=Import sub-set of meta-data
 F_METADATA_SUBSET_EXPORT=Export sub-set of meta-data
+F_METADATA_IMPORT=Import meta-Data
+F_METADATA_EXPORT=Export meta-Data
 F_APPROVE_DATA=Approve data
 F_APPROVE_DATA_LOWER_LEVELS=Approve data at lower levels
 F_ACCEPT_DATA_LOWER_LEVELS=Accept data at lower levels
@@ -264,8 +270,6 @@
 F_RUN_VALIDATION=Run validation
 F_PROGRAM_TRACKING_LIST=View program tracking
 F_MYDATAMART_VIEW=Access my data mart
-F_METADATA_EXPORT=Export Meta-Data
-F_METADATA_IMPORT=Import Meta-Data
 F_LOCALE_ADD=Add Locale
 F_LOCALE_DELETE=Delete Locale
 F_TRACKED_ENTITY_INSTANCE_REMINDER_MANAGEMENT=Manage Tracked Entity Instance Reminders