mirror of
https://github.com/fleetdm/fleet
synced 2026-05-21 07:58:31 +00:00
Closes: https://github.com/fleetdm/confidential/issues/4057 Changes: - Added the contents of the fleet-vulnerability-dashboard repo to ee/vulnerability-dashboard - Added a github workflow to deploy the vulnerability dashboard on Heroku - Added a github workflow to test changes to the vulnerability-dashboard - Updated the website's custom configuration to enable auto-approvals/review requests to files in the ee/vulnerability-dashboard folder
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
|
|
});
|
|
|
|
}
|
|
|
|
|
|
};
|