← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4998: bugfix; oust incorrectly adjusted selection roots when a user was edited

 

------------------------------------------------------------
revno: 4998
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-10-21 14:00:00 +0200
message:
  bugfix; oust incorrectly adjusted selection roots when a user was edited
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateUserAction.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-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateUserAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateUserAction.java	2011-10-13 15:15:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateUserAction.java	2011-10-21 12:00:00 +0000
@@ -226,11 +226,14 @@
         userService.updateUserCredentials( userCredentials );
         userService.updateUser( user );
 
-        selectionManager.setRootOrganisationUnits( units );
-        selectionManager.setSelectedOrganisationUnits( units );
+        if ( currentUserService.getCurrentUser() == user )
+        {
+            selectionManager.setRootOrganisationUnits( units );
+            selectionManager.setSelectedOrganisationUnits( units );
 
-        selectionTreeManager.setRootOrganisationUnits( units );
-        selectionTreeManager.setSelectedOrganisationUnits( units );
+            selectionTreeManager.setRootOrganisationUnits( units );
+            selectionTreeManager.setSelectedOrganisationUnits( units );
+        }
 
         if ( units.size() > 0 )
         {