Rest API: Bug in documents_comments_update [SOLVED]

When things don't work as they should.
Post Reply
qra
50 Posts
50 Posts
Posts: 52
Joined: Fri Oct 25, 2019 9:08 pm
Location: Poland

Rest API: Bug in documents_comments_update [SOLVED]

Post by qra »

If user B edit comment created by user A, in log (Events) is write user A instead of user B.
User avatar
rosarior
Developer
Developer
Posts: 688
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: Rest API: Bug in documents_comments_update

Post by rosarior »

Thanks for the report,

We found the root of the issue however it cannot be fixed at the moment. The REST API framework does not allow passing the user in the request to the save method of the comment. This is how Mayan gets the value of the user executing the action.

We have a refactor for the event system planned and it addresses this issue and makes the event system behave exactly the same regardless of where the save method was called from.

We will try to add a one-off fix for the comment issue as a temporary measure while the full re-implementation get finished.

Thanks!
User avatar
rosarior
Developer
Developer
Posts: 688
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: Rest API: Bug in documents_comments_update

Post by rosarior »

A fix for the issue has been committed:
- https://gitlab.com/mayan-edms/mayan-edm ... a033a26311
- https://gitlab.com/mayan-edms/mayan-edm ... 7210c4ba89

It will be included in version 3.4.15.

Thanks for the report!
Post Reply