From 02fa8002d4c1e80f7a41cb1575e94f9dc50b40da Mon Sep 17 00:00:00 2001 From: Paul Rodwell Date: Mon, 13 Aug 2018 07:56:22 +0100 Subject: [PATCH] add indication of where code restricted access is needed --- server/social.coffee | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/server/social.coffee b/server/social.coffee index daccf07..49b46dd 100644 --- a/server/social.coffee +++ b/server/social.coffee @@ -387,6 +387,18 @@ module.exports = exports = (log, loga, argv) -> } res.render(path.join(__dirname, '..', 'views', 'done.html'), info) + # if configured, enforce restricted access + if argv.restricted? + app.all('*', (req, res, next) -> + # add code here to determine if user should have access to site. + # + # if access if to be allowed call `next()` + # + # if access is not allowed display a splash screen, + # this will need a login link that call the same code as clicking on the padlock + # + ) + app.get '/auth/addAuthDialog', (req, res) -> # only makes sense to add alternative authentication scheme if # this the user is authenticated