LT-117: Remove the user from reviewers of user is logout

This commit is contained in:
Aysel Afsar committed 2016-04-04 10:35:52 -04:00
1 parent 2da841bab0
commit 8ee2eaf644
4 files changed
+15 -12

No files matched your search

@@ -84,15 +84,16 @@ function getReviewerTipText(reviewers) {
}
// Observe changes on WorklistTabs
// remove the current user from Reviewers if tab is removed
WorklistTabs.find().observe({
removed: function(tab) {
var timepointId = tab.timepointId;
if (!timepointId) {
return;
var contentId = tab.contentid;
var timepointIds = ViewerData[contentId].timepointIds;
if (timepointIds.length > 0) {
timepointIds.forEach(function(timepointId) {
// Remove the current user from Reviewers
Meteor.call('removeReviewer', timepointId);
});
}
// Remove the current user from Reviewers
Meteor.call('removeReviewer', timepointId);
}
});
@@ -45,6 +45,8 @@ Template.userAccountMenu.events({
$('#serverInformationModal').modal('show');
},
'click #logoutButton': function() {
// Remove reviewers info for the user
Meteor.call('removeUserFromReviewers', Meteor.userId());
Meteor.logout(function() {
Router.go('/entrySignIn');
});