Fix for Express-handlebars@3.1.0

This commit is contained in:
Ylian Saint-Hilaire 2019-05-14 17:14:43 -07:00
parent 980ab3b4a6
commit 8d4def18bb
5 changed files with 8 additions and 4 deletions

View File

@ -958,6 +958,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
{ {
// Add many new user accounts // Add many new user accounts
if ((user.siteadmin & 2) == 0) break; if ((user.siteadmin & 2) == 0) break;
if ((domain.auth == 'sspi') || (domain.auth == 'ldap')) break;
if (!Array.isArray(command.users)) break; if (!Array.isArray(command.users)) break;
var userCount = 0; var userCount = 0;
for (var i in command.users) { for (var i in command.users) {

View File

@ -1,6 +1,6 @@
{ {
"name": "meshcentral", "name": "meshcentral",
"version": "0.3.4-i", "version": "0.3.4-j",
"keywords": [ "keywords": [
"Remote Management", "Remote Management",
"Intel AMT", "Intel AMT",

File diff suppressed because one or more lines are too long

View File

@ -302,7 +302,7 @@
<div style="float:right"> <div style="float:right">
<input type=button onclick=showUserBroadcastDialog() style=margin-right:6px value="Broadcast" /> <input type=button onclick=showUserBroadcastDialog() style=margin-right:6px value="Broadcast" />
<img onclick=p4downloadUserInfo() style="cursor:pointer" title="Download user information" src="images/link4.png" /> <img onclick=p4downloadUserInfo() style="cursor:pointer" title="Download user information" src="images/link4.png" />
<img onclick=p4batchAccountCreate() style="cursor:pointer" title="batch create many user accounts" src="images/link6.png" /> <img id=p4UserBatchCreate onclick=p4batchAccountCreate() style="cursor:pointer;display:none" title="Batch create many user accounts" src="images/link6.png" />
</div> </div>
<div> <div>
<input id=UserNewAccountButton type=button style=margin-left:6px onclick=showCreateNewAccountDialog() value="New Account..." /> <input id=UserNewAccountButton type=button style=margin-left:6px onclick=showCreateNewAccountDialog() value="New Account..." />
@ -1044,6 +1044,9 @@
// Setup the user interface in the right mode // Setup the user interface in the right mode
userInterfaceSelectMenu(); userInterfaceSelectMenu();
// If SSPI or LDAP authentication not used, allow batch account creation.
QV('p4UserBatchCreate', (features & 0x00080000) == 0);
} }
// Toggle the web page to full screen // Toggle the web page to full screen

View File

@ -2633,7 +2633,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
} }
// Setup middleware // Setup middleware
obj.app.engine('handlebars', obj.exphbs({})); // defaultLayout: 'main' obj.app.engine('handlebars', obj.exphbs({ defaultLayout: null })); // defaultLayout: 'main'
obj.app.set('view engine', 'handlebars'); obj.app.set('view engine', 'handlebars');
if (obj.args.tlsoffload) { obj.app.set('trust proxy', obj.args.tlsoffload); } // Reverse proxy should add the "X-Forwarded-*" headers if (obj.args.tlsoffload) { obj.app.set('trust proxy', obj.args.tlsoffload); } // Reverse proxy should add the "X-Forwarded-*" headers
obj.app.use(obj.bodyParser.urlencoded({ extended: false })); obj.app.use(obj.bodyParser.urlencoded({ extended: false }));