dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #28821
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14458: Minor
------------------------------------------------------------
revno: 14458
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-03-26 23:35:09 +0100
message:
Minor
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/MenuController.java
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/menu/action/GetModulesAction.java
--
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-api/src/main/java/org/hisp/dhis/api/controller/MenuController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/MenuController.java 2014-03-25 12:28:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/MenuController.java 2014-03-26 22:35:09 +0000
@@ -63,9 +63,12 @@
User user = currentUserService.getCurrentUser();
- user.getApps().clear();
- user.getApps().addAll( apps );
+ if ( apps != null && !apps.isEmpty() && user != null )
+ {
+ user.getApps().clear();
+ user.getApps().addAll( apps );
- userService.updateUser( user );
+ userService.updateUser( user );
+ }
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/menu/action/GetModulesAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/menu/action/GetModulesAction.java 2014-03-25 12:28:24 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/webportal/menu/action/GetModulesAction.java 2014-03-26 22:35:09 +0000
@@ -66,7 +66,7 @@
final List<String> userApps = currentUserService.getCurrentUser().getApps();
- if ( userApps != null )
+ if ( userApps != null && !userApps.isEmpty() )
{
Collections.sort( modules, new Comparator<Module>()
{