diff options
author | Sheogorath | 2018-05-23 01:14:52 +0200 |
---|---|---|
committer | Sheogorath | 2018-05-24 18:10:36 +0200 |
commit | 41a36e2e1877b4a2ab6751c011e80582f8ccbcf2 (patch) | |
tree | d96cfb0701143d824da6b5310435885e917d64b7 /lib | |
parent | 7a91d01830f739d48eb1cb716f32372fd7cf7f68 (diff) |
Add privacy and ToS links
To be GDPR compliant we need to provide privacy statement. These should
be linked on the index page. So as soon as a document exist under
`public/docs/privacy.md` the link will show up.
Since we already add legal links, we also add Terms of Use, which will
show up as soon as `public/docs/terms-of-use.md` exists.
This should allow everyone to provide the legal documents they need for
GDPR and other privacy and business laws.
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/response.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/response.js b/lib/response.js index ae3e45fa..2ea2f1c6 100644 --- a/lib/response.js +++ b/lib/response.js @@ -2,6 +2,7 @@ // response // external modules var fs = require('fs') +var path = require('path') var markdownpdf = require('markdown-pdf') var shortId = require('shortid') var querystring = require('querystring') @@ -75,7 +76,9 @@ function showIndex (req, res, next) { allowPDFExport: config.allowPDFExport, signin: req.isAuthenticated(), infoMessage: req.flash('info'), - errorMessage: req.flash('error') + errorMessage: req.flash('error'), + privacyStatement: fs.existsSync(path.join(config.docsPath, 'privacy.md')), + termsOfUse: fs.existsSync(path.join(config.docsPath, 'terms-of-use.md')) }) } |