sqlpad
Version:
Web app for writing and running SQL queries and visualizing the results. Supports Postgres, MySQL, SQL Server, Crate and Vertica.
11 lines (9 loc) • 386 B
JavaScript
var passport = require('passport')
const config = require('../lib/config.js')
module.exports = function mustBeAuthenticatedOrChartLinkNoAuth(req, res, next) {
if (req.isAuthenticated() || !config.get('tableChartLinksRequireAuth')) {
return next()
}
passport.authenticate('basic', { session: false })(req, res, next)
// next(new Error('You must be logged in to do that'))
}