mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
Related to: #20296 Changes: - Added `ee/bulk-operations-dashboard`, a Sails.js app that lets users manage configuration profiles and scripts across multiple teams on a Fleet instance. - Added a Github workflow to deploy the app to Heroku - Added a Github workflow to test changes to the bulk operations dashboard.
35 lines
555 B
JavaScript
35 lines
555 B
JavaScript
module.exports = {
|
|
|
|
|
|
friendlyName: 'Update password',
|
|
|
|
|
|
description: 'Update the password for the logged-in user.',
|
|
|
|
|
|
inputs: {
|
|
|
|
password: {
|
|
description: 'The new, unencrypted password.',
|
|
example: 'abc123v2',
|
|
required: true
|
|
}
|
|
|
|
},
|
|
|
|
|
|
fn: async function ({password}) {
|
|
|
|
// Hash the new password.
|
|
var hashed = await sails.helpers.passwords.hashPassword(password);
|
|
|
|
// Update the record for the logged-in user.
|
|
await User.updateOne({ id: this.req.me.id })
|
|
.set({
|
|
password: hashed
|
|
});
|
|
|
|
}
|
|
|
|
|
|
};
|