← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14702: default to not filter userRoles in api, added new query parm 'canIssue', updated source url in ad...

 

------------------------------------------------------------
revno: 14702
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2014-04-06 20:42:52 +0700
message:
  default to not filter userRoles in api, added new query parm 'canIssue', updated source url in add/edit user
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/user/UserRoleController.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/addUserForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/updateUserForm.vm


--
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/user/UserRoleController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/user/UserRoleController.java	2014-04-06 13:11:26 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/user/UserRoleController.java	2014-04-06 13:42:52 +0000
@@ -56,7 +56,11 @@
     protected List<UserAuthorityGroup> getEntityList( WebMetaData metaData, WebOptions options )
     {
         List<UserAuthorityGroup> entityList = super.getEntityList( metaData, options );
-        userService.canIssueFilter( entityList );
+
+        if ( options.getOptions().containsKey( "canIssue" ) && Boolean.parseBoolean( options.getOptions().get( "canIssue" ) ) )
+        {
+            userService.canIssueFilter( entityList );
+        }
 
         return entityList;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/addUserForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/addUserForm.vm	2014-04-06 12:57:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/addUserForm.vm	2014-04-06 13:42:52 +0000
@@ -26,7 +26,7 @@
     });
 
     $('#urAvailable').selected({
-      url: '../api/userRoles.json',
+      url: '../api/userRoles.json?canIssue=true',
       target: $('#urSelected'),
       search: $('#urAvailableSearch'),
       iterator: 'userRoles'

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/updateUserForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/updateUserForm.vm	2014-04-06 12:57:33 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/updateUserForm.vm	2014-04-06 13:42:52 +0000
@@ -33,7 +33,7 @@
     selectionTree.buildSelectionTree();
 
     $('#urAvailable').selected({
-      url: '../api/userRoles.json',
+      url: '../api/userRoles.json?canIssue=true',
       target: $('#urSelected'),
       search: $('#urAvailableSearch'),
       iterator: 'userRoles'