mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 00:49:03 +00:00
Changes: - Added a modal to the /device-management page where users can fill out a form to see an MDM demo video. - Added a new email template: `email-mdm-video`, that is sent to users who submit the form on the device management page. - Added a new action: `deliver-mdm-demo-email.js`, that sends an MDM demo video email. - Updated the modal component to allow the default styling to be overridden on a page-by-page basis (Moved inline styles into the component's stylesheet) - Updated `website/config/routes.js`, `website/config/policies.js`, and ran the `rebuild-cloud-sdk` script.
47 lines
1.2 KiB
JavaScript
Vendored
47 lines
1.2 KiB
JavaScript
Vendored
module.exports = {
|
||
|
||
|
||
friendlyName: 'Deliver MDM demo video email',
|
||
|
||
|
||
description: 'Sends an email address containing a link to a MDM demo video to the specified email address',
|
||
|
||
extendedDescription: 'This action is triggered by form submissions on the /device-management page',
|
||
|
||
inputs: {
|
||
emailAddress: {
|
||
description: 'The email address provided when this user requested access to the MDM demo video',
|
||
type: 'string',
|
||
required: true,
|
||
},
|
||
},
|
||
|
||
|
||
exits: {
|
||
success: {
|
||
description: 'An MDM demo video email was successfully sent'
|
||
}
|
||
},
|
||
|
||
|
||
fn: async function ({emailAddress}) {
|
||
|
||
// Send an email to the provided email address that contains a link to Dave's MDM demo.
|
||
await sails.helpers.sendTemplateEmail.with({
|
||
to: emailAddress,
|
||
subject: 'Dave’s MDM video (again)',
|
||
from: sails.config.custom.fromEmailAddress,
|
||
fromName: sails.config.custom.fromName,
|
||
template: 'email-mdm-video',
|
||
templateData: {}
|
||
}).intercept((err)=>{
|
||
return new Error(`When trying to send a MDM demo video email for a user with the email address ${emailAddress}, an error occured. full error: ${err.stack}`);
|
||
});
|
||
|
||
// All done.
|
||
return;
|
||
|
||
}
|
||
|
||
|
||
};
|