mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Add admin ability : Impersonate one user.
This commit is contained in:
parent
8f6c3550e3
commit
d19cc972e0
5 changed files with 859 additions and 821 deletions
|
|
@ -194,6 +194,7 @@ BlazeComponent.extendComponent({
|
|||
return [
|
||||
{
|
||||
'click a.edit-user': Popup.open('editUser'),
|
||||
'click a.more-settings-user': Popup.open('settingsUser'),
|
||||
},
|
||||
];
|
||||
},
|
||||
|
|
@ -343,3 +344,16 @@ Template.newUserPopup.events({
|
|||
Popup.close();
|
||||
},
|
||||
});
|
||||
|
||||
Template.settingsUserPopup.events({
|
||||
'click .impersonate-user'(event) {
|
||||
event.preventDefault();
|
||||
|
||||
Meteor.call('impersonate', this.userId, err => {
|
||||
if (!err) {
|
||||
FlowRouter.go('/');
|
||||
Meteor.connection.setUserId(this.userId);
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue