Add privacyPolicyURL (CMD_PRIVACY_POLICY_URL)

If you use Google OAuth, you need to add Privacy Policy to the top.
https://support.google.com/cloud/answer/9110914#all-apps-zippy
https://github.com/hackmdio/codimd/issues/1582#issuecomment-682270394

Signed-off-by: Tamotsu Takahashi <ttakah@gmail.com>
This commit is contained in:
Tamotsu Takahashi 2020-09-01 20:54:08 +09:00
parent 1465355c76
commit f42d1c3e3e
4 changed files with 4 additions and 0 deletions

1
app.js
View File

@ -194,6 +194,7 @@ app.set('view engine', 'ejs')
app.locals.useCDN = config.useCDN
app.locals.serverURL = config.serverURL
app.locals.sourceURL = config.sourceURL
app.locals.privacyPolicyURL = config.privacyPolicyURL
app.locals.allowAnonymous = config.allowAnonymous
app.locals.allowAnonymousEdits = config.allowAnonymousEdits
app.locals.permission = config.permission

View File

@ -37,6 +37,7 @@ module.exports = {
defaultPermission: 'editable',
dbURL: '',
db: {},
privacyPolicyURL: '',
// ssl path
sslKeyPath: '',
sslCertPath: '',

View File

@ -35,6 +35,7 @@ module.exports = {
sessionSecret: process.env.CMD_SESSION_SECRET,
sessionLife: toIntegerConfig(process.env.CMD_SESSION_LIFE),
responseMaxLag: toIntegerConfig(process.env.CMD_RESPONSE_MAX_LAG),
privacyPolicyURL: process.env.CMD_PRIVACY_POLICY_URL,
imageUploadType: process.env.CMD_IMAGE_UPLOAD_TYPE,
imgur: {
clientID: process.env.CMD_IMGUR_CLIENTID

View File

@ -156,6 +156,7 @@
<h6 class="social-foot">
<%- __('Follow us on %s and %s.', '<a href="https://github.com/hackmdio/CodiMD" target="_blank" rel="noopener"><i class="fa fa-github"></i> GitHub</a>, <a href="https://gitter.im/hackmdio/hackmd" target="_blank" rel="noopener"><i class="fa fa-comments"></i> Gitter</a>', '<a href="https://poeditor.com/join/project/q0nuPWyztp" target="_blank" rel="noopener"><i class="fa fa-globe"></i> POEditor</a>') %>
</h6>
<% if(privacyPolicyURL && privacyPolicyURL.length > 0) { %><p><a href="<%- privacyPolicyURL %>"><%= __('Privacy Policy') %></a></p><% } %>
</div>
</div>
</div>