linagora / tmail-backend

GNU Affero General Public License v3.0
30 stars 17 forks source link

[PublicAsset] PublicAsset/set update JMAP method #1050

Closed Arsnael closed 1 month ago

Arsnael commented 1 month ago

classic set update jmap method. Only identityIds can be updated

Request:

{
  "using": ["urn:ietf:params:jmap:core", "com:linagora:params:public:assets"],
  "methodCalls": [
    [
      "PublicAsset/set", {
        "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
        "update": {
          "4f29": {
            "identityIds": ["12", "34", "56"]
          }
        }
      }, "0"
    ]
  ]
}

Response:

{
  "sessionState": "2c9f1b12-b35a-43e6-9af2-0106fb53a943",
  "methodResponses": [
    ["PublicAsset/set", {
      "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
      "newState": "2c9f1b12-b35a-43e6-9af2-0106fb53a943",
      "updated": {
        "4f29": null
      }
    }, "0"]
  ]
}

DoD: integration tests

chibenwa commented 1 month ago

We need to enforce that:

vttranlina commented 1 month ago

When I remove an identity, other identity ids shall be removed in the background? (other task?)

Task created for it

vttranlina commented 1 month ago

pr https://github.com/linagora/tmail-backend/pull/1063