From b82026fe85ca7b4171d030de5bdc6fcb9f5a9613 Mon Sep 17 00:00:00 2001 From: STEINNI Date: Fri, 26 Jun 2026 16:19:17 +0000 Subject: [PATCH] new chans in config, & allow SUB by template for [UID], and added cnxId & [CUID] --- actions/pubSub.js | 2 ++ wssGatewayConfig.json | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/actions/pubSub.js b/actions/pubSub.js index f6ecdd2..bba1e96 100644 --- a/actions/pubSub.js +++ b/actions/pubSub.js @@ -20,6 +20,7 @@ export const methods = { let subscribed = [] for(var chan of payload){ if((!chan) || (typeof(chan)!='string')) continue + chan = chan.replace(/\[UID\]/g, this.userId) if(!this.accessRights.canSubscribe(this.userId, this.roles, chan)) { if(this.debug) console.log('SUB: No rights to this chan!', this.userId, this.roles, chan) continue @@ -72,6 +73,7 @@ export const methods = { let unSubscribed = [] for(var chan of payload){ if((!chan) || (typeof(chan)!='string')) continue + chan = chan.replace(/\[UID\]/g, this.userId) if(this.accessRights.isMandatory(this.userId, this.roles, chan)) continue let couldUnsubscribe = false diff --git a/wssGatewayConfig.json b/wssGatewayConfig.json index 6a56d5a..4856170 100644 --- a/wssGatewayConfig.json +++ b/wssGatewayConfig.json @@ -16,10 +16,10 @@ { "roles": "*", "mustSubscribe": [ "system:notifs:[UID]", "system:notifs", "system:replies:[UID]" ], - "canSubscribe": ["system:gps:*", "arena:gps:*","arena:agents:*", + "canSubscribe": [ "system:gps:*", "arena:gps:*","arena:agents:*", "system:observer:subscribed[UID]:agents", - "system:maestro:lifecycle:[UID]"], - "canPublish": [ "system:requests:*", "system:observer:requests"], + "system:maestro:lifecycle:[UID]" ], + "canPublish": [ "system:requests:*", "system:observer:requests" ], "canSet": [ ], "canGet": [ ] }