summaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'app.js')
-rw-r--r--app.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/app.js b/app.js
index 46fd041c..7795dd83 100644
--- a/app.js
+++ b/app.js
@@ -175,6 +175,29 @@ app.set('views', config.viewPath)
app.engine('ejs', ejs.renderFile)
// set view engine
app.set('view engine', 'ejs')
+// set generally available variables for all views
+app.locals.useCDN = config.useCDN
+app.locals.serverURL = config.serverURL
+app.locals.allowAnonymous = config.allowAnonymous
+app.locals.allowAnonymousEdits = config.allowAnonymousEdits
+app.locals.allowPDFExport = config.allowPDFExport
+app.locals.authProviders = {
+ facebook: config.isFacebookEnable,
+ twitter: config.isTwitterEnable,
+ github: config.isGitHubEnable,
+ gitlab: config.isGitLabEnable,
+ mattermost: config.isMattermostEnable,
+ dropbox: config.isDropboxEnable,
+ google: config.isGoogleEnable,
+ ldap: config.isLDAPEnable,
+ ldapProviderName: config.ldap.providerName,
+ saml: config.isSAMLEnable,
+ oauth2: config.isOAuth2Enable,
+ oauth2ProviderName: config.oauth2.providerName,
+ openID: config.isOpenIDEnable,
+ email: config.isEmailEnable,
+ allowEmailRegister: config.allowEmailRegister
+}
app.use(require('./lib/web/baseRouter'))
app.use(require('./lib/web/statusRouter'))