ever-traduora
ever-traduora copied to clipboard
Deleting a Project User will delete the user on a Random Project
Describe the bug Deleting a Project User will delete the user on a Random Project
To Reproduce Steps to reproduce the behavior:
- On an empty Traduora instance, create two projects
- Add 2 users to both project with the ADMIN role
- Remove access to one of them
- It will disappear from the interface, but refreshing brings it back
- The user access was revoked on a different project
Expected behavior Removing access to a user should remove the access on the current project.
Environment:
- Device: Desktop
- OS: Ubuntu
- Browser: Firefox
Additional context
I also tried going through the API and the same occurs.
Checking the code, it appears the projectId
argument is ignored on the DELETE
endpoint.
https://github.com/ever-co/ever-traduora/blob/d1cd6bcd20318f04b23d3be2429edf0d4d8b35bc/api/src/controllers/project-user.controller.ts#L97-L99
This would explain what's happening. I think this should be similar to other endpoints, like here for example, in the same file:
https://github.com/ever-co/ever-traduora/blob/d1cd6bcd20318f04b23d3be2429edf0d4d8b35bc/api/src/controllers/project-user.controller.ts#L62-L65
Have you had a chance to look at this?