diff options
author | Claudius | 2018-09-13 21:26:39 +0200 |
---|---|---|
committer | Claudius | 2018-11-03 00:52:48 +0100 |
commit | 44ffc564da1dd20b2fae3247d9fa314a52e0aaca (patch) | |
tree | 05a313b4a9526547b8b1782b9094135e2064d6d1 /app.js | |
parent | 637f955bddabf953778d27ffe348683bf1c27653 (diff) |
removing global site layout vars from individual routers, putting them into app.local
Signed-off-by: Claudius <opensource@amenthes.de>
Diffstat (limited to '')
-rw-r--r-- | app.js | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -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')) |