------------------------------------------------------------
revno: 17796
committer: Lars Helge Overland <[email protected]>
branch nick: dhis2
timestamp: Thu 2014-12-25 15:21:10 +0100
message:
  Supportive method for getting managed users
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/User.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-api/src/main/java/org/hisp/dhis/user/User.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/User.java	2014-12-25 14:10:43 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/User.java	2014-12-25 14:21:10 +0000
@@ -248,7 +248,19 @@
     {
         return userCredentials != null && userCredentials.isSuper();
     }
-        
+    
+    public Set<UserGroup> getManagedGroups()
+    {
+        Set<UserGroup> managedGroups = new HashSet<>();
+        
+        for ( UserGroup group : groups )
+        {
+            managedGroups.addAll( group.getManagedGroups() );
+        }
+        
+        return managedGroups;
+    }
+    
     /**
      * Indicates whether this user can manage the given user group.
      * 

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp

Reply via email to