Tung TRAN created JAMES-3893: -------------------------------- Summary: Add a WebAdmin API allowing managing user identity Key: JAMES-3893 URL: https://issues.apache.org/jira/browse/JAMES-3893 Project: James Server Issue Type: New Feature Reporter: Tung TRAN
h2. Why Provide the API for admin managing user identity: * List identities of a user * Create a user's identity * Editing a user's identity h2. How h3. List identities of a user {code:java} GET /users/{username}/identities {code} Response example: {code:java} [ { "id": "3739a34e-cd8c-3a42-bf28-578ba24da9da", "name": "bob-al...@domain.tld", "email": "bob-al...@domain.tld", "mayDelete": false, "textSignature": "", "htmlSignature": "", "bcc": [{ "email": "bo...@domain.tld", "name": "My Boss 2" }], "replyTo": [{ "email": "b...@domain.tld", "name": "My Boss" }], "sortOrder": 1 }, { "id": "3739a34e-cd8c-3a42-bf28-578ba24da8da", "name": "james-team-mail...@domain.tld", "email": "james-team-mail...@domain.tld", "mayDelete": false, "textSignature": "", "htmlSignature": "", "bcc": [{ "email": "bo...@domain.tld", "name": "My Boss 2" }], "replyTo": [{ "email": "b...@domain.tld", "name": "My Boss" }], "sortOrder": 2 } ] {code} * API to get the default identity of a user {code:java} GET /users/{username}/identities?default=true {code} h3. Create a user's identity - Creating a new/first `mayDelete=true` identity API (if a user has no default identity yet) {code:java} POST /users/{username}/identities { "name": "Bob", "email": "b...@domain.tld", "mayDelete": true, "htmlSignature": "a html signature", "textSignature": "a text signature", "bcc": [{ "email": "bo...@domain.tld", "name": "My Boss 2" }], "replyTo": [{ "email": "b...@domain.tld", "name": "My Boss" }], "sortOrder": 0 }{code} Creating with empty fields: `mayDelete` (always = true), `htmlSignature`, `textSignature`, `bcc`, `replyTo` should be supported cause we likely can not get these data from LDAP. h3. Editing a user's identity {code:java} PUT /users/{username}/identities/{identityId} { "name": "Bob", "email": "b...@domain.tld", "mayDelete": true, "htmlSignature": "a html signature", "textSignature": "a text signature", "bcc": [{ "email": "bo...@domain.tld", "name": "My Boss 2" }], "replyTo": [{ "email": "b...@domain.tld", "name": "My Boss" }], "sortOrder": 0 }{code} Updating with empty fields: `mayDelete` (always = true), `htmlSignature`, `textSignature`, `bcc`, `replyTo` should be supported cause we likely can not get these data from LDAP. - Editing a use default identity API (the idea is to do filtering on James' side, if LSC can do it easily, we can skip this API) {code:java} PUT /users/{username}/identities?default=true { "name": "Bob", "email": "b...@domain.tld", "mayDelete": true, "htmlSignature": "a html signature", "textSignature": "a text signature", "bcc": [{ "email": "bo...@domain.tld", "name": "My Boss 2" }], "replyTo": [{ "email": "b...@domain.tld", "name": "My Boss" }], "sortOrder": 0 }{code} Updating with empty fields: `mayDelete` (always = true), `htmlSignature`, `textSignature`, `bcc`, `replyTo` should be supported cause we likely can not get these data from LDAP. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org