mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Expand pluginHandler support to communicate with browser<->server over the control channel.
Expand plugin functionality on agents to get plugin commands as their own action.
This commit is contained in:
parent
8e57eb5a23
commit
6432467bf6
3 changed files with 7 additions and 19 deletions
|
@ -50,6 +50,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
|||
var obj = {};
|
||||
obj.user = user;
|
||||
obj.domain = domain;
|
||||
obj.ws = ws;
|
||||
|
||||
// Server side Intel AMT stack
|
||||
const WsmanComm = require('./amt/amt-wsman-comm.js');
|
||||
|
@ -3105,7 +3106,10 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
|||
if (command.routeToNode === true) {
|
||||
routeCommandToNode(command);
|
||||
} else {
|
||||
// TODO
|
||||
try {
|
||||
var pluginHandler = require('./pluginHandler.js').pluginHandler(parent.parent);
|
||||
pluginHandler.plugins[command.plugin].serveraction(command, obj, parent);
|
||||
} catch (e) { console.log('Error loading plugin handler (' + e + ')'); }
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue