dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #34612
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17745: Missing json annotation, renamed user.groups to user.userGroups
------------------------------------------------------------
revno: 17745
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-12-19 15:51:19 +0100
message:
Missing json annotation, renamed user.groups to user.userGroups
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/User.java
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserAction.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-10-10 12:08:01 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/User.java 2014-12-19 14:51:19 +0000
@@ -453,7 +453,7 @@
this.userCredentials = userCredentials;
}
- @JsonProperty
+ @JsonProperty( "userGroups" )
@JsonSerialize( contentAs = BaseIdentifiableObject.class )
@JsonView( { DetailedView.class } )
@JacksonXmlElementWrapper( localName = "userGroups", namespace = DxfNamespaces.DXF_2_0 )
=== 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-12-19 12:59:07 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/user/UserController.java 2014-12-19 14:51:19 +0000
@@ -327,7 +327,7 @@
if ( valid != null )
{
- ContextUtils.conflictResponse( response, valid );
+ ContextUtils.conflictResponse( response, valid + ": " + user.getUserCredentials() );
return false;
}
@@ -387,7 +387,7 @@
ImportTypeSummary summary = importService.importObject( currentUserService.getCurrentUser().getUid(), user, ImportStrategy.CREATE );
renderService.toJson( response.getOutputStream(), summary );
-
+
addUserGroups( user );
}
@@ -444,7 +444,7 @@
* @param user user object (including user groups) parsed from the POST request
*/
private void addUserGroups( User user )
- {
+ {
if ( user.getGroups() != null )
{
for ( UserGroup ug : new ArrayList<>( user.getGroups() ) )
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserAction.java 2014-11-26 15:32:32 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserAction.java 2014-12-19 14:51:19 +0000
@@ -366,10 +366,8 @@
userCredentials.setUserAuthorityGroups( userAuthorityGroups );
// ---------------------------------------------------------------------
- // Dimension constraints
- //
- // Note that any new user must inherit dimension constraints (if any)
- // from the current user.
+ // Dimension constraints. Note that any new user must inherit dimension
+ // constraints if any from the current user.
// ---------------------------------------------------------------------
userCredentials.setCogsDimensionConstraints( new HashSet<>( currentUser.getUserCredentials().getCogsDimensionConstraints() ) );