linagora / james-project

Mirror of Apache James Project
Apache License 2.0
72 stars 62 forks source link

Add a WebAdmin API allowing listing user default identity #4720

Closed quantranhong1999 closed 1 year ago

quantranhong1999 commented 1 year ago

Why

How

Use IdentityRepository list API

DoD

chibenwa commented 1 year ago

The endpoint could be GET /users/{username}/identities

chibenwa commented 1 year ago

API to get the default identity of a user

May not be needed? The LSC plugin would use the first identity that have mayDelete=true as a pivot, create if none with maximum amount of fields populated with the LDAP data.

chibenwa commented 1 year ago

Misses sortOrder field, replyTo, bcc fields.

quantranhong1999 commented 1 year ago

May not be needed? The LSC plugin would use the first identity that have mayDelete=true as a pivot, create if none with maximum amount of fields populated with the LDAP data.

Maybe. But I am not sure filtering on the LSC side could be done easily (long time no touch LSC), so I will let the GET default identity API for now.

vttranlina commented 1 year ago

PR https://github.com/apache/james-project/pull/1470

vttranlina commented 1 year ago

With default=true parameter, the response should return json list (containing [] character) Eg:

[
{
    "id": "3739a34e-cd8c-3a42-bf28-578ba24da8ds",
    "name": "Bob default identity",
    "email": "bob@domain.tld",
    ...
    "sortOrder": 3
}
]

Because the default is just a query parameter, and the endpoint is not changed.

vttranlina commented 1 year ago

Jira: https://issues.apache.org/jira/browse/JAMES-3893