diff --git a/accesscontroltool-bundle/src/main/java/biz/netcentric/cq/tools/actool/ims/request/CreateGroupStep.java b/accesscontroltool-bundle/src/main/java/biz/netcentric/cq/tools/actool/ims/request/CreateGroupStep.java index 70242b2f..fead3fcc 100644 --- a/accesscontroltool-bundle/src/main/java/biz/netcentric/cq/tools/actool/ims/request/CreateGroupStep.java +++ b/accesscontroltool-bundle/src/main/java/biz/netcentric/cq/tools/actool/ims/request/CreateGroupStep.java @@ -1,9 +1,12 @@ package biz.netcentric.cq.tools.actool.ims.request; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeName; @JsonTypeName("createUserGroup") +@JsonInclude(Include.NON_NULL) public class CreateGroupStep implements Step { // this cannot be a constant, but still needs to be serialized as literal @@ -13,6 +16,5 @@ public class CreateGroupStep implements Step { //@JsonProperty //String name; @JsonProperty - public - String description; + public String description; // this may be null } diff --git a/accesscontroltool-bundle/src/test/java/biz/netcentric/cq/tools/actool/ims/IMSUserManagementIT.java b/accesscontroltool-bundle/src/test/java/biz/netcentric/cq/tools/actool/ims/IMSUserManagementIT.java index 365cfc15..6a86ffb0 100644 --- a/accesscontroltool-bundle/src/test/java/biz/netcentric/cq/tools/actool/ims/IMSUserManagementIT.java +++ b/accesscontroltool-bundle/src/test/java/biz/netcentric/cq/tools/actool/ims/IMSUserManagementIT.java @@ -47,6 +47,11 @@ public HttpClientBuilder newBuilder() { group.setAuthorizableId("testGroup"); group.setDescription("my description"); imsUserManagement.updateGroups(Collections.singleton(group)); + + // test without description + AuthorizableConfigBean group2 = new AuthorizableConfigBean(); + group2.setAuthorizableId("testGroup"); + imsUserManagement.updateGroups(Collections.singleton(group2)); } private static String getMandatoryEnvironmentVariable(String name) {