ever-traduora icon indicating copy to clipboard operation
ever-traduora copied to clipboard

Deleting a Project User will delete the user on a Random Project

Open p32blo opened this issue 1 year ago • 1 comments

Describe the bug Deleting a Project User will delete the user on a Random Project

To Reproduce Steps to reproduce the behavior:

  1. On an empty Traduora instance, create two projects
  2. Add 2 users to both project with the ADMIN role
  3. Remove access to one of them
  4. It will disappear from the interface, but refreshing brings it back
  5. 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

p32blo avatar May 29 '23 15:05 p32blo

Have you had a chance to look at this?

p32blo avatar Sep 28 '23 09:09 p32blo