Configuration split to lists, send configurations and server config.
This is before testing.
This commit is contained in:
parent
4fce4b6f81
commit
c12efeb97f
40 changed files with 819 additions and 311 deletions
|
@ -5,18 +5,20 @@ const config = require('config');
|
|||
const permissions = require('./permissions');
|
||||
const forms = require('../models/forms');
|
||||
const shares = require('../models/shares');
|
||||
const urls = require('./urls');
|
||||
|
||||
async function getAnonymousConfig(context) {
|
||||
async function getAnonymousConfig(context, trusted) {
|
||||
return {
|
||||
authMethod: passport.authMethod,
|
||||
isAuthMethodLocal: passport.isAuthMethodLocal,
|
||||
externalPasswordResetLink: config.ldap.passwordresetlink,
|
||||
language: config.language || 'en',
|
||||
isAuthenticated: !!context.user,
|
||||
urlBase: config.www.urlBase,
|
||||
sandboxUrlBase: config.www.sandboxUrlBase,
|
||||
port: config.www.port,
|
||||
sandboxPort: config.www.sandboxPort
|
||||
trustedUrlBase: urls.getTrustedUrl(),
|
||||
trustedUrlBaseDir: urls.getTrustedUrlBaseDir(),
|
||||
sandboxUrlBase: urls.getSandboxUrl(),
|
||||
sandboxUrlBaseDir: urls.getSandboxUrlBaseDir(),
|
||||
trusted
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,7 +31,8 @@ async function getAuthenticatedConfig(context) {
|
|||
namespace: context.user.namespace
|
||||
},
|
||||
globalPermissions: shares.getGlobalPermissions(context),
|
||||
editors: config.editors
|
||||
editors: config.editors,
|
||||
verpEnabled: config.verp.enabled
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue