-
Notifications
You must be signed in to change notification settings - Fork 97
Added delete a user service ,Added remove icon and refresh the user list #13
base: master
Are you sure you want to change the base?
Conversation
@@ -31,7 +31,7 @@ class SQLUserDAO(val database: SQLDatabase) extends UserDAO with SQLUserSchema { | |||
} | |||
|
|||
def findById(userId: ObjectId) = findOneWhere(_.id === userId) | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this empty line
@@ -26,6 +26,15 @@ angular.module('codebrag.userMgmt') | |||
}); | |||
}; | |||
|
|||
$scope.deleteUser = function(userId) { | |||
$scope.flash.clear(); | |||
var userData = { userId: userId }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this is not used
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
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. I have verified that /rest/users is called immediately after delete service. Can conclude UI layer is proper What else could be the issues. Any hint will be of great help |
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. |
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. |
assert(deletedUser === None , "Deletion was attempted but found " + deletedUser) | ||
} | ||
it should "deleta a user and should not show in the list " taggedAs RequiresDb in { | ||
// given |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo -> 'delete'
grey bar |
To remove a user #11
Added a delete icon in manage team members. Admin user cannot delete himself.