Delete user feature

This commit is contained in:
guillaume 2019-04-26 17:53:48 +02:00
parent 11a91bfc78
commit cdef8a33e4
6 changed files with 62 additions and 2 deletions

View file

@ -98,6 +98,7 @@ Template.peopleRow.helpers({
Template.editUserPopup.onCreated(function() {
this.authenticationMethods = new ReactiveVar([]);
this.errorMessage = new ReactiveVar('');
Meteor.call('getAuthenticationsEnabled', (_, result) => {
if (result) {
@ -129,6 +130,9 @@ Template.editUserPopup.helpers({
const selected = Users.findOne(userId).authenticationMethod;
return selected === 'ldap';
},
errorMessage() {
return Template.instance().errorMessage.get();
},
});
BlazeComponent.extendComponent({
@ -220,4 +224,9 @@ Template.editUserPopup.events({
});
} else Popup.close();
},
'click #deleteButton'() {
Users.remove(this.userId);
Popup.close();
},
});