fleet/website/api/controllers/admin/view-sandbox-waitlist.js
Eric 46802ee56a
Website: Add admin page to manage the Fleet Sandbox waitlist (#13111)
Closes: #12954

Changes:
- Added an admin page that displays a table containing all of the users
that are currently on the Fleet Sandbox waitlist where admins can
approve waitlisted users.
- Added a new email template that tells users that their Fleet Sandbox
instance is ready.
- Added a new action:
`admin/provision-sandbox-instance-and-deliver-email.js`, an action that
provisions a Fleet sandbox instance for a single user and sends them an
email telling them that their Fleet Sandbox Instance is ready.
- Added a script that provisions a Fleet Sandbox instance for the user
who has been on the waitlist the longest and sends them an email telling
them that their Sandbox instance is ready.
2023-08-04 18:32:00 -05:00

31 lines
440 B
JavaScript
Vendored

module.exports = {
friendlyName: 'View sandbox waitlist',
description: 'Display "Sandbox waitlist" page.',
exits: {
success: {
viewTemplatePath: 'pages/admin/sandbox-waitlist'
}
},
fn: async function () {
let usersCurrentlyOnWaitlist = await User.find({inSandboxWaitlist: true})
.sort('createdAt ASC');
return {
usersWaitingForSandboxInstance: usersCurrentlyOnWaitlist
};
}
};