← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16823: App installation, catching exceptions caused by lack of permissions on server

 

------------------------------------------------------------
revno: 16823
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-09-26 08:00:54 +0200
message:
  App installation, catching exceptions caused by lack of permissions on server
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AddAppAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/org/hisp/dhis/appmanager/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-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AddAppAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AddAppAction.java	2014-07-18 11:32:11 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/java/org/hisp/dhis/appmanager/action/AddAppAction.java	2014-09-26 06:00:54 +0000
@@ -31,6 +31,7 @@
 import java.io.BufferedInputStream;
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.IOException;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
 
@@ -145,6 +146,12 @@
                 log.error( "Error parsing JSON in manifest", ex );
                 return FAILURE;
             }
+            catch ( IOException ex )
+            {
+                message = i18n.getString( "appmanager_could_not_read_file_check_server_permissions" );
+                log.error( "App could not not be read, check server permissions" );
+                return FAILURE;
+            }
         }
     }
     

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/org/hisp/dhis/appmanager/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/org/hisp/dhis/appmanager/i18n_module.properties	2013-10-22 12:17:54 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/resources/org/hisp/dhis/appmanager/i18n_module.properties	2014-09-26 06:00:54 +0000
@@ -13,6 +13,7 @@
 appmanager_not_zip=App is not a valid ZIP archive
 appmanager_confirm_delete=Are you sure to delete this app?
 appmanager_invalid_json=Invalid JSON syntax in manifest file
+appmanager_could_not_read_file_check_server_permissions=Could not read app files, check server permissions
 appmanager_delete_success=App deleted successfully
 appmanager_management=Manage Installed Apps
 appmanager_appname=Application name