JosefCevik / JWManagement

GNU Affero General Public License v3.0
57 stars 30 forks source link

Useraccount was completely deleted after being deleted in one (and only) project #431

Open e-diehl opened 2 years ago

e-diehl commented 2 years ago

Question: Will that also happen if the user is still in another project?

tim-antkowiak commented 2 years ago

Hey, I just looked into the code and found the following piece in the "removeFromProject" function:

if (!RoleManager.hasPermissions(userId)) {
      Users.remove(userId)
}

So if the user has no permissions whatsoever after removed from the project, the user will be completely deleted.

If the user is in another project, even just as member, it should not get deleted.