ever-co / ever-traduora

Ever® Traduora™ - Open Translation Management Platform - https://traduora.co
https://traduora.co
GNU Affero General Public License v3.0
1.97k stars 197 forks source link

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

Open p32blo opened 1 year ago

p32blo commented 1 year ago

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:

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 commented 10 months ago

Have you had a chance to look at this?