1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Early work on WebPowerSwitch support.

This commit is contained in:
Ylian Saint-Hilaire 2021-12-14 03:22:18 -08:00
parent 3905620495
commit 1567594ef3
3 changed files with 260 additions and 21 deletions

View file

@ -1940,7 +1940,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
else if ((parent.args.wanonly == true) && (command.meshtype == 3)) { err = 'Invalid group type'; } // Local device group type is not allowed in WAN mode
else if ((domain.ipkvm == null) && (command.meshtype == 4)) { err = 'Invalid group type'; } // IP KVM device group type is not allowed unless enabled
if ((err == null) && (command.meshtype == 4)) {
if (command.kvmmodel !== 1) { err = 'Invalid KVM model'; }
if ((command.kvmmodel < 1) || (command.kvmmodel > 2)) { err = 'Invalid KVM model'; }
else if (common.validateString(command.kvmhost, 1, 128) == false) { err = 'Invalid KVM hostname'; }
else if (common.validateString(command.kvmuser, 1, 128) == false) { err = 'Invalid KVM username'; }
else if (common.validateString(command.kvmpass, 1, 128) == false) { err = 'Invalid KVM password'; }