<commit_before>Template[getTemplate('users_list_actions')].helpers({
  isInvited: function() {
    return this.isInvited;
  },
  userIsAdmin: function(){
    return isAdmin(this);
  },
});

Template[getTemplate('users_list_actions')].events({
  'click .invite-link': function(e, instance){
    e.preventDefault();
    Meteor.call('inviteUser', { userId : instance.data._id });
  },
  'click .uninvite-link': function(e, instance){
    e.preventDefault();
    Meteor.users.update(instance.data._id,{
      $set:{
        isInvited: false
      }
    });
  },
  'click .admin-link': function(e, instance){
    e.preventDefault();
    updateAdmin(instance.data._id, true);
  },
  'click .unadmin-link': function(e, instance){
    e.preventDefault();
    updateAdmin(instance.data._id, false);
  },
  'click .delete-link': function(e, instance){
    e.preventDefault();
    if(confirm(i18n.t("are_you_sure_you_want_to_delete")+getDisplayName(instance.data)+"?"))
      Meteor.users.remove(instance.data._id);
  }
});<commit_msg>switch to "this" instead of "instance.data"<commit_after>Template[getTemplate('users_list_actions')].helpers({
  isInvited: function() {
    return this.isInvited;
  },
  userIsAdmin: function(){
    return isAdmin(this);
  },
});

Template[getTemplate('users_list_actions')].events({
  'click .invite-link': function(e){
    e.preventDefault();
    Meteor.call('inviteUser', { userId : this._id });
  },
  'click .uninvite-link': function(e){
    e.preventDefault();
    Meteor.users.update(this._id,{
      $set:{
        isInvited: false
      }
    });
  },
  'click .admin-link': function(e){
    e.preventDefault();
    updateAdmin(this._id, true);
  },
  'click .unadmin-link': function(e){
    e.preventDefault();
    updateAdmin(this._id, false);
  },
  'click .delete-link': function(e){
    e.preventDefault();
    if(confirm(i18n.t("are_you_sure_you_want_to_delete")+getDisplayName(this)+"?"))
      Meteor.users.remove(this._id);
  }
});
{'fraction_non_alphanumeric': 0.18034447821681865, 'fraction_numerical': 0.002026342451874367, 'mean_word_length': 3.8886138613861387, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2062', 'n_tokens_mistral': 676, 'n_tokens_neox': 677, 'n_words': 96}