Updated Login and User Management with new materialize and controls

This commit is contained in:
Brian McGonagill 2024-07-25 09:56:37 -05:00
parent 81559683eb
commit 1d7ecc3efa
13 changed files with 280 additions and 84 deletions

View file

@ -32,11 +32,30 @@ Meteor.methods({
}
},
'edit.userPass' (userId, newPassword) {
check(userId, String);
check(newPassword, String);
return Accounts.setPassword(userId, newPassword);
},
'delete.userFromSys' (userId) {
check(userId, String);
return Meteor.users.remove({ _id: userId });
},
'update.userEmail' (userId, email) {
check(userId, String);
check(email, String);
return Meteor.users.update({ _id: userId }, {
$set: {
'emails.0.address': email,
}
});
},
'edit.userRole' (userId, role) {
check(userId, String);
check(role, String);
return Roles.setUserRoles(userId, role);
}
});