Website: Update /try-fleet/explore-data redirect (#15739)

Closes: #15728

Changes:
- Updated `view-query-report.js` to redirect non-logged in users who
visit `/try-fleet/explore-data/*` to `/try-fleet/register`
This commit is contained in:
Eric 2023-12-19 17:52:38 -06:00 committed by GitHub
parent 45da77b698
commit 39f9c50cda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,9 +54,9 @@ module.exports = {
throw {badConfig: 'builtStaticContent.osqueryTables'};
}
// If the requesting user is not logged in, redirect them to the /try-fleet/login page with the specified hostPlatform added as a query parameter.
// If the requesting user is not logged in, redirect them to the /try-fleet/register page with the specified hostPlatform added as a query parameter.
if(!this.req.me){
throw {redirect: `/try-fleet/login?targetPlatform=${encodeURIComponent(hostPlatform)}` };
throw {redirect: `/try-fleet/register?targetPlatform=${encodeURIComponent(hostPlatform)}` };
}
if(!sails.config.custom.queryIdsByTableName){