codebrag
codebrag copied to clipboard
Added delete a user service ,Added remove icon and refresh the user list
To remove a user #11 Added a delete icon in manage team members. Admin user cannot delete himself.

Do we really want to allow remove users?
I am still unsure about it. Maybe we should allow only users created by mistake (without follow-ups, etc.) or only those "just" created (within specified time frame)?
Removing users that were active and have some user related data (comments, follow-ups, etc) seems as not the best idea, instead I would prefer "deactivate" action.
I wont need a delete if we can resolve below
- When the author is matched with user id it is case sensitive. I happen to create user with lower case. Since the author name is in proper case , he is not able to get any followups
- We should allow change userid
- I happen to give wrong email alias to a wrong author Simple option seems to be allow to delete the user and create again Other option is allow changing the username and alias
- We should allow remove an aliase
- What happens when two users want to have the same alias ?
Request your thoughts
This pull request has a strange behavior. Not sure how to fix. Also not sure if this could occur in other parts of the application. After the user is deleted, view is refreshed with updated list of users. This list is not updated in the immediate request. So effectively the user still appears on the manage users popup. The proper list appears in subsequent operations like page refresh, delete another user,
I have verified that /rest/users is called immediately after delete service. Can conclude UI layer is proper I have added a test case "delete a user and should not show in the list" in dao layer to simulate. But not able to simulate. Can conclude DAO layer is proper Checked my proxy configurations and cache settings. Seems clean.
What else could be the issues. Any hint will be of great help Thanks
Please pull this feature, it's useful.
@gmkumar2005 I'm reviewing this one and cannot see what happens to user's followups when one gets deleted? I guess they should be removed (followups, not comments/likes).
This PR just removes a record from user tables. I think followups should remain for below reasons 1) Followups contain valuable conversations and design ideas 2) If the user was deleted by mistake he can be created again and his work is also recovered. If we allow to delete all the followups and conversations there should be a way to recover
Nope, followups itself (as objects) are just mappings between user and comment/like. There is no point keeping them around when user with given ID gets removed. Even when you recreate this user he/she will get completely new ID and "old" followups will not be reassigned, in fact they will be "orphaned" when user gets removed.
This is not to remove "reactions" (comments/likes), but only followups which are just notifications about reactions
So maybe instead removing a user, it should be turn into inactive state? In such situation there be no need to drop any other data.
grey bar