Cannot delete comments on version 2022.05 BETA

Issue #453 resolved
Care-BE created an issue

Hello Team, good afternoon.

Currently, we had installed the latest version on the UAT environment of a Belgian client and we wanted to test the Delete Comment functionality but it is not working. Is there anything that should be done especially to enable this?

Thanks in advance.

Comments (17)

  1. Care-BE reporter

    Hello @Scott Wiltshire , good morning.

    Based on your previous response, what should we do about it?

    Thanks in advance.

  2. Care-BE reporter

    Hello @Scott Wiltshire good morning,

    Could you please be so kind of letting us know if there are ay news about this?

    Thanks in advance.

  3. Scott Wiltshire

    Only admin can delete comments for all users. Otherwise you can only delete your own comments.

  4. Care-BE reporter

    Hello @Scott Wiltshire , good morning.

    Sorry but that is not the case. 

    We are just posting a comment and try deleting it immediately. 

    So we are trying to delete our own comment and we have an admin account. 

    Is there anything special that needs to be done to enable this?

    Thanks in advance.

  5. Care-BE reporter

    Hello @Scott Wiltshire , good morning.

    Do you have any updates about this?

    Thanks in advance.

  6. Scott Wiltshire

    @Care-BE currently this feature is implemented via a PATCH request directly to the }CellAnnotations cube so if the user doesn’t have write access to the cube then the deletion will fail (you can see this in the Network tab of the browser console where the batch request will fail with the status CubeCellWriteStatusCubeNoWriteAccess). As an immediate local workaround you can edit security in the model so that any group with at least READ access to a base cube recieves WRITE access to the CellAnnotations cube.

    The proper fix is that we implement this feature using http DELETE request to the annotations entity.

    @Ilia Shapiro here’s an example of the tm1py implementation https://github.com/cubewise-code/tm1py/blob/6aea07d0f8e814b5c913d95b400fc2285ea4f075/TM1py/Services/AnnotationService.py#L81

  7. Care-BE reporter

    Hello,

    We have tried this but still, do not succeed.

    @Ilia Shapiro could you please be so kind of letting me know if it is possible for you to do a quick sharing screen session to look at this together?

    Thanks in advance.

  8. Scott Wiltshire

    Hi @Care-BE I have tested this with non-admin user. You just need to make sure write access to the }annotation cube is granted. I can trouble shoot with you now if you like.
    In next FP this is fixed and backend extra access to control cubes is not required.

  9. Scott Wiltshire
    • changed status to open

    Re-opening. Issue is back in 2022.06 FP1. User unable to delete own comments. Admin also unable to delete any comments.

  10. Care-BE reporter

    Hi Scott,

    Did you mean you foget share a settings.json here? We couldn’t follow your last comment.

    Thanks.

    Regards,

    Gerardo.

  11. Scott Wiltshire

    The following 2 entries need to be added to allowedRestPaths in settings.json for the delete comments feature to work.

    {
      "path": "/Annotations.*",
      "method": "GET"
    },
    {
      "path": "/Annotations(.*)",
      "method": "DELETE"
    },
    

  12. Log in to comment