mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 21:47:20 +00:00
Changes: - Updated the User model to have a new attribute: `canUseQueryGenerator` a boolean attribute that will grant users access to the query generator page on the website. - Added a new policy: `has-query-generate-access` - Moved the query generator page from the admin section of the website. Note: before this change can be merged, the website's database will need to be migrated to add the new column to the User table
29 lines
515 B
JavaScript
Vendored
29 lines
515 B
JavaScript
Vendored
module.exports = {
|
|
|
|
|
|
friendlyName: 'View query generator',
|
|
|
|
|
|
description: 'Display "Query generator" page.',
|
|
|
|
|
|
exits: {
|
|
|
|
success: {
|
|
viewTemplatePath: 'pages/admin/query-generator'
|
|
},
|
|
badConfig: { responseType: 'badConfig' },
|
|
},
|
|
|
|
|
|
fn: async function () {
|
|
if (!_.isObject(sails.config.builtStaticContent) || !_.isArray(sails.config.builtStaticContent.schemaTables)) {
|
|
throw {badConfig: 'builtStaticContent.schemaTables'};
|
|
}
|
|
// Respond with view.
|
|
return {};
|
|
|
|
}
|
|
|
|
|
|
};
|