Arsnael commented on code in PR #1471:
URL: https://github.com/apache/james-project/pull/1471#discussion_r1122778649
##########
server/protocols/webadmin/webadmin-jmap/src/main/java/org/apache/james/webadmin/data/jmap/dto/UserIdentity.java:
##########
@@ -113,6 +131,43 @@ public UserIdentity(String name, String email, String id,
this.replyTo = replyTo;
}
+ @JsonCreator
+ public UserIdentity(@JsonProperty("name") String name,
Review Comment:
I don't get:
- why there is no mayDelete field (I think the always true is if it's
missing? but if it is filled it should not be server set? Can't the create
identity webadmin route be used for creating non default identities as well
logically?)
- I don't think it's a valid constructor... I would see more this as a
UserIdentityCreate or something similar. The identity does not exist yet, there
is no id for example, I would tend to think it is a slightly different object?
##########
server/protocols/webadmin/webadmin-jmap/src/test/java/org/apache/james/webadmin/data/jmap/UserIdentitiesRoutesTest.java:
##########
@@ -290,4 +292,219 @@ void
listIdentitiesShouldReturnNotFoundWhenCanNotQueryDefaultIdentity() {
" \"details\": null" +
"}");
}
+
+ @Test
+ void createIdentityShouldWork() {
+ String creationRequest = "" +
+ " {" +
+ " \"name\": \"create name 1\"," +
+ " \"email\": \"[email protected]\"," +
+ " \"mayDelete\": true," +
Review Comment:
that would go with my previous point.. you do declare the mayDelete field in
your creation payload?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]