← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17391: Allow superuser to create users via Web API in any user groups.

 

------------------------------------------------------------
revno: 17391
committer: jimgrace@xxxxxxxxx
branch nick: dhis2
timestamp: Sat 2014-11-08 12:52:46 -0500
message:
  Allow superuser to create users via Web API in any user groups.
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.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/webapi/controller/user/UserController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.java	2014-11-08 17:30:22 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.java	2014-11-08 17:52:46 +0000
@@ -362,7 +362,7 @@
             }
         }
 
-        if ( writeGroupRequired && !writeGroupFound )
+        if ( writeGroupRequired && !writeGroupFound && !currentUserService.currentUserIsSuper() )
         {
             throw new CreateAccessDeniedException( "The new user must be assigned to a user group to which you have write access." );
         }