summaryrefslogtreecommitdiffstats
path: root/models/users.js
diff options
context:
space:
mode:
authorThuan Pham Quoc <thuanpq.io@gmail.com>2017-12-01 15:55:53 +0700
committerThuan Pham Quoc <thuanpq.io@gmail.com>2017-12-01 15:55:53 +0700
commit22e369804b2a6ed82a6da2c469519cd7252693a0 (patch)
treea48d4a60683dc0419147accd3041230f8b4d1a2a /models/users.js
parent54036fd7a3ac9bf25b6c601890491af66571d5ff (diff)
downloadwekan-22e369804b2a6ed82a6da2c469519cd7252693a0.tar.gz
wekan-22e369804b2a6ed82a6da2c469519cd7252693a0.tar.bz2
wekan-22e369804b2a6ed82a6da2c469519cd7252693a0.zip
Allow admin to change user password in admin panel
Diffstat (limited to 'models/users.js')
-rw-r--r--models/users.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/models/users.js b/models/users.js
index 11a53ce6..92cee9f6 100644
--- a/models/users.js
+++ b/models/users.js
@@ -372,6 +372,13 @@ Meteor.methods({
Meteor.call('setUsername', username, userId);
Meteor.call('setEmail', email, userId);
},
+ setPassword(newPassword, userId) {
+ check(userId, String);
+ check(newPassword, String);
+ if(Meteor.user().isAdmin){
+ Accounts.setPassword(userId, newPassword);
+ }
+ },
});
if (Meteor.isServer) {