5pm-HDH/churchtools-api

Update Request

Closed this issue · 2 comments

Error in PersonUpdateRequestTest:
Response for this Integration Test:

{
  "message": "Forbidden to edit the field statusId",
  "translatedMessage": "Keine Berechtigung um das Feld statusId zu sehen oder zu editieren",
  "messageKey": "error.forbidden.edit.field",
  "args": {
    "field": "statusId"
  },
  "errors": []
}
  • Prevent "statusId" from being sent to updateRequest
  • Write the message and translatedMessage to the CTPermissionException for better readability

@Naitsirch Do you run into the same issue with this Integration-Test? How we can handle this Error? Should we create a "blacklist" for update attributes? Or split the getModifiableAttributes into getModifiableAttributesUpdate and getModifiableAttributesCreate?

The issue is with the permissions setting of your user. I had the same error. But after my user account was assigned to a more privileged role, it worked ;-)

Alright! Thanks for your fast reply. Then i close the bug and just update the integration-test!