diff options
Diffstat (limited to 'app.js')
-rw-r--r-- | app.js | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -175,6 +175,35 @@ 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.sourceURL = config.sourceURL +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 +} + +// Export/Import menu items +app.locals.enableDropBoxSave = config.isDropboxEnable +app.locals.enableGitHubGist = config.isGitHubEnable +app.locals.enableGitlabSnippets = config.isGitlabSnippetsEnable app.use(require('./lib/web/baseRouter')) app.use(require('./lib/web/statusRouter')) |