Fixed Linux interactive installer.

This commit is contained in:
Ylian Saint-Hilaire 2020-09-14 13:32:16 -07:00
parent a148ad07e2
commit f0a3280f7e
2 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,9 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
var s = null, msh = {}, buttons = ['Cancel'], skip = false;
// The folloing line just below with 'msh=' needs to stay exactly like this since MeshCentral will replace it with the correct settings.
var msh = {};
var s = null, buttons = ['Cancel'], skip = false;
try { s = require('service-manager').manager.getService('meshagent'); } catch (e) { }
function _install(parms) {

View File

@ -4468,9 +4468,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
break;
}
case 'createDeviceShareLink': {
var maxExpireMinutes = (typeof domain.maxguestsessionsharingtime == 'number') ? domain.maxguestsessionsharingtime : 60;
console.log(maxExpireMinutes);
var err = null;
var err = null, maxExpireMinutes = (typeof domain.maxguestsessionsharingtime == 'number') ? domain.maxguestsessionsharingtime : 60;
if (common.validateString(command.nodeid, 8, 128) == false) { err = 'Invalid node id'; } // Check the meshid
else if (common.validateString(command.guestname, 1, 128) == false) { err = 'Invalid guest name'; } // Check the guest name
else if (common.validateInt(command.expire, 1, maxExpireMinutes) == false) { err = 'Invalid expire time'; } // Check the expire time in hours