Added LoginFooter option.
This commit is contained in:
parent
2329023259
commit
3dc616151a
|
@ -174,7 +174,8 @@
|
|||
"welcomeText": { "type": "string", "description": "Text that will be shown on the login screen." },
|
||||
"welcomePicture": { "type": "string", "description": "Name of the PNG or JPEG file that will be shown on the login screen. Put this file in the meshcentral-data folder and place the file name here." },
|
||||
"hide": { "type": "integer", "default": 0 },
|
||||
"footer": { "type": "string", "default": null },
|
||||
"footer": { "type": "string", "default": null, "description": "This is a HTML string displayed at the bottom of the web page when a user is logged in." },
|
||||
"loginfooter": { "type": "string", "default": null "description": "This is a HTML string displayed at the bottom of the web page when a user is not logged in." },
|
||||
"certUrl": {
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
|
|
|
@ -139,6 +139,7 @@
|
|||
"___hide__": "Sum of: 1 = Hide header, 2 = Hide tab, 4 = Hide footer, 8 = Hide title, 16 = Hide left bar",
|
||||
"_hide": 4,
|
||||
"_footer": "<a href='https://twitter.com/mytwitter'>Twitter</a>",
|
||||
"_loginfooter": "This is a private server.",
|
||||
"_certUrl": "https://192.168.2.106:443/",
|
||||
"myServer": {
|
||||
"Backup": false,
|
||||
|
|
|
@ -2554,7 +2554,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
|||
if (domain.customui != null) { customui = encodeURIComponent(JSON.stringify(domain.customui)); }
|
||||
|
||||
// Render the login page
|
||||
render(req, res, getRenderPage((domain.sitestyle == 2) ? 'login2' : 'login', req, domain), getRenderArgs({ loginmode: loginmode, rootCertLink: getRootCertLink(), newAccount: newAccountsAllowed, newAccountPass: (((domain.newaccountspass == null) || (domain.newaccountspass == '')) ? 0 : 1), serverDnsName: obj.getWebServerName(domain), serverPublicPort: httpsPort, passlogin: (typeof domain.showpasswordlogin == 'boolean') ? domain.showpasswordlogin : true, emailcheck: emailcheck, features: features, sessiontime: args.sessiontime, passRequirements: passRequirements, customui: customui, footer: (domain.footer == null) ? '' : domain.footer, hkey: encodeURIComponent(hardwareKeyChallenge).replace(/'/g, '%27'), messageid: msgid, passhint: passhint, welcometext: domain.welcometext ? encodeURIComponent(domain.welcometext).split('\'').join('\\\'') : null, hwstate: hwstate, otpemail: otpemail, otpsms: otpsms, twoFactorCookieDays: twoFactorCookieDays, authStrategies: authStrategies.join(','), loginpicture: (typeof domain.loginpicture == 'string') }, req, domain, (domain.sitestyle == 2) ? 'login2' : 'login'));
|
||||
render(req, res, getRenderPage((domain.sitestyle == 2) ? 'login2' : 'login', req, domain), getRenderArgs({ loginmode: loginmode, rootCertLink: getRootCertLink(), newAccount: newAccountsAllowed, newAccountPass: (((domain.newaccountspass == null) || (domain.newaccountspass == '')) ? 0 : 1), serverDnsName: obj.getWebServerName(domain), serverPublicPort: httpsPort, passlogin: (typeof domain.showpasswordlogin == 'boolean') ? domain.showpasswordlogin : true, emailcheck: emailcheck, features: features, sessiontime: args.sessiontime, passRequirements: passRequirements, customui: customui, footer: (domain.loginfooter == null) ? '' : domain.loginfooter, hkey: encodeURIComponent(hardwareKeyChallenge).replace(/'/g, '%27'), messageid: msgid, passhint: passhint, welcometext: domain.welcometext ? encodeURIComponent(domain.welcometext).split('\'').join('\\\'') : null, hwstate: hwstate, otpemail: otpemail, otpsms: otpsms, twoFactorCookieDays: twoFactorCookieDays, authStrategies: authStrategies.join(','), loginpicture: (typeof domain.loginpicture == 'string') }, req, domain, (domain.sitestyle == 2) ? 'login2' : 'login'));
|
||||
}
|
||||
|
||||
// Handle a post request on the root
|
||||
|
|
Loading…
Reference in New Issue