[
https://issues.apache.org/jira/browse/JAMES-3893?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tung TRAN updated JAMES-3893:
-----------------------------
Description:
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": "[email protected]",
"email": "[email protected]",
"mayDelete": false,
"textSignature": "",
"htmlSignature": "",
"bcc": [{
"email": "[email protected]",
"name": "My Boss 2"
}],
"replyTo": [{
"email": "[email protected]",
"name": "My Boss"
}],
"sortOrder": 1
},
{
"id": "3739a34e-cd8c-3a42-bf28-578ba24da8da",
"name": "[email protected]",
"email": "[email protected]",
"mayDelete": false,
"textSignature": "",
"htmlSignature": "",
"bcc": [{
"email": "[email protected]",
"name": "My Boss 2"
}],
"replyTo": [{
"email": "[email protected]",
"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": "[email protected]",
"mayDelete": true,
"htmlSignature": "a html signature",
"textSignature": "a text signature",
"bcc": [{
"email": "[email protected]",
"name": "My Boss 2"
}],
"replyTo": [{
"email": "[email protected]",
"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": "[email protected]",
"mayDelete": true,
"htmlSignature": "a html signature",
"textSignature": "a text signature",
"bcc": [{
"email": "[email protected]",
"name": "My Boss 2"
}],
"replyTo": [{
"email": "[email protected]",
"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": "[email protected]",
"mayDelete": true,
"htmlSignature": "a html signature",
"textSignature": "a text signature",
"bcc": [{
"email": "[email protected]",
"name": "My Boss 2"
}],
"replyTo": [{
"email": "[email protected]",
"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.
was:
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": "[email protected]",
"email": "[email protected]",
"mayDelete": false,
"textSignature": "",
"htmlSignature": "",
"bcc": [{
"email": "[email protected]",
"name": "My Boss 2"
}],
"replyTo": [{
"email": "[email protected]",
"name": "My Boss"
}],
"sortOrder": 1
},
{
"id": "3739a34e-cd8c-3a42-bf28-578ba24da8da",
"name": "[email protected]",
"email": "[email protected]",
"mayDelete": false,
"textSignature": "",
"htmlSignature": "",
"bcc": [{
"email": "[email protected]",
"name": "My Boss 2"
}],
"replyTo": [{
"email": "[email protected]",
"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": "[email protected]",
"mayDelete": true,
"htmlSignature": "a html signature",
"textSignature": "a text signature",
"bcc": [{
"email": "[email protected]",
"name": "My Boss 2"
}],
"replyTo": [{
"email": "[email protected]",
"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": "[email protected]",
"mayDelete": true,
"htmlSignature": "a html signature",
"textSignature": "a text signature",
"bcc": [{
"email": "[email protected]",
"name": "My Boss 2"
}],
"replyTo": [{
"email": "[email protected]",
"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": "[email protected]",
"mayDelete": true,
"htmlSignature": "a html signature",
"textSignature": "a text signature",
"bcc": [{
"email": "[email protected]",
"name": "My Boss 2"
}],
"replyTo": [{
"email": "[email protected]",
"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.
> 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
> Priority: Minor
>
> 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": "[email protected]",
> "email": "[email protected]",
> "mayDelete": false,
> "textSignature": "",
> "htmlSignature": "",
> "bcc": [{
> "email": "[email protected]",
> "name": "My Boss 2"
> }],
> "replyTo": [{
> "email": "[email protected]",
> "name": "My Boss"
> }],
> "sortOrder": 1
> },
> {
> "id": "3739a34e-cd8c-3a42-bf28-578ba24da8da",
> "name": "[email protected]",
> "email": "[email protected]",
> "mayDelete": false,
> "textSignature": "",
> "htmlSignature": "",
> "bcc": [{
> "email": "[email protected]",
> "name": "My Boss 2"
> }],
> "replyTo": [{
> "email": "[email protected]",
> "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": "[email protected]",
> "mayDelete": true,
> "htmlSignature": "a html signature",
> "textSignature": "a text signature",
> "bcc": [{
> "email": "[email protected]",
> "name": "My Boss 2"
> }],
> "replyTo": [{
> "email": "[email protected]",
> "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": "[email protected]",
> "mayDelete": true,
> "htmlSignature": "a html signature",
> "textSignature": "a text signature",
> "bcc": [{
> "email": "[email protected]",
> "name": "My Boss 2"
> }],
> "replyTo": [{
> "email": "[email protected]",
> "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": "[email protected]",
> "mayDelete": true,
> "htmlSignature": "a html signature",
> "textSignature": "a text signature",
> "bcc": [{
> "email": "[email protected]",
> "name": "My Boss 2"
> }],
> "replyTo": [{
> "email": "[email protected]",
> "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: [email protected]
For additional commands, e-mail: [email protected]