Closed chibenwa closed 6 months ago
I thought yes it was designed that way? You can't delete a server-set identity? What's wrong with that?
EDIT: Got it reading the PR
Missing link to it btw: https://github.com/apache/james-project/pull/2083
CC @quantranhong1999
It is likely not related to the JMAP default identity work but the merging and updating server set identity logic. cc @vttranlina may give better insight on this?
Bug came from when We tried to update the serverSet identity the first time,
The current logic will create the new Identity, and set mayDelete = true
https://github.com/apache/james-project/blob/ea088b79869afee4666f13f26f96670833d7cb2f/server/data/data-jmap/src/main/scala/org/apache/james/jmap/api/identity/CustomIdentityDAO.scala#L245
How to fix it?
mayDelete=false
before storage if it is server set identitypr fix it: https://github.com/apache/james-project/pull/2087
Or you fix it by remembering this is server set when merging the custom identity and the server set ones.
Which would also fix instantly existing instances...
Can combine two fixes I guess?
Why not
GIVEN I modified my default identity in the webmain WHEN I try to delete it THEN it fails
results in
Either
mayDelete=false
or have the deletion succeeds.CC @quantranhong1999