mirror of
https://github.com/fleetdm/fleet
synced 2026-05-22 16:39:01 +00:00
37 lines
601 B
JavaScript
37 lines
601 B
JavaScript
|
|
module.exports = {
|
||
|
|
|
||
|
|
|
||
|
|
friendlyName: 'View fleetctl preview',
|
||
|
|
|
||
|
|
|
||
|
|
description: 'Display "fleetctl preview" page.',
|
||
|
|
|
||
|
|
|
||
|
|
exits: {
|
||
|
|
|
||
|
|
success: {
|
||
|
|
viewTemplatePath: 'pages/fleetctl-preview'
|
||
|
|
},
|
||
|
|
|
||
|
|
redirect: {
|
||
|
|
description: 'The requesting user is not logged in.',
|
||
|
|
responseType: 'redirect'
|
||
|
|
},
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
|
||
|
|
fn: async function () {
|
||
|
|
|
||
|
|
// Note: This page bypasses the 'is-logged-in' policy so we can redirect not-logged-in users to the /try-fleet/login page,
|
||
|
|
if(!this.req.me){
|
||
|
|
throw {redirect: '/try-fleet/login' };
|
||
|
|
}
|
||
|
|
// Respond with view.
|
||
|
|
return {};
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
};
|