From ed42582ce7597d23dd6db6a134e6721a2452ceba Mon Sep 17 00:00:00 2001 From: STEINNI Date: Sat, 27 Jun 2026 17:26:14 +0000 Subject: [PATCH] removed [CNXID] cursor delirium, changed frustum chan to [CUID] --- accesRights.js | 4 ++-- actions/pubSub.js | 6 +++--- wssGatewayConfig.json | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/accesRights.js b/accesRights.js index f111127..0709b2f 100644 --- a/accesRights.js +++ b/accesRights.js @@ -11,9 +11,9 @@ export class AccesRights { } expandPattern(pattern, uid, cnxId=null) { - if(/\[CNXID\]/.test(pattern) && !cnxId) return(null) + if(/\[CUID\]/.test(pattern) && !cnxId) return(null) let item = pattern.replace(/\[UID\]/g, uid) - if(cnxId) item = item.replace(/\[CNXID\]/g, cnxId) + if(cnxId) item = item.replace(/\[CUID\]/g, cnxId) return(item) } diff --git a/actions/pubSub.js b/actions/pubSub.js index 53ee4cd..3000bff 100644 --- a/actions/pubSub.js +++ b/actions/pubSub.js @@ -21,7 +21,7 @@ export const methods = { for(var chan of payload){ if((!chan) || (typeof(chan)!='string')) continue chan = chan.replace(/\[UID\]/g, this.userId) - chan = chan.replace(/\[CNXID\]/g, this.uuid) + chan = chan.replace(/\[CUID\]/g, this.uuid) if(!this.accessRights.canSubscribe(this.userId, this.roles, chan, this.uuid)) { if(this.debug) console.log('SUB: No rights to this chan!', this.userId, this.roles, chan) continue @@ -75,7 +75,7 @@ export const methods = { for(var chan of payload){ if((!chan) || (typeof(chan)!='string')) continue chan = chan.replace(/\[UID\]/g, this.userId) - chan = chan.replace(/\[CNXID\]/g, this.uuid) + chan = chan.replace(/\[CUID\]/g, this.uuid) if(this.accessRights.isMandatory(this.userId, this.roles, chan, this.uuid)) continue let couldUnsubscribe = false @@ -231,7 +231,7 @@ export const methods = { } payload.channel = payload.channel.replace(/\[UID\]/g, this.userId) - .replace(/\[CNXID\]/g, this.uuid) + .replace(/\[CUID\]/g, this.uuid) if( (!this.accessRights.canSubscribe(this.userId, this.roles, payload.channel, this.uuid)) ) { this.sendErr(action, 'CHANHIST: Unauthorized channel !', reqid) return diff --git a/wssGatewayConfig.json b/wssGatewayConfig.json index 4856170..67b6f9c 100644 --- a/wssGatewayConfig.json +++ b/wssGatewayConfig.json @@ -15,11 +15,11 @@ "accessRights":[ { "roles": "*", - "mustSubscribe": [ "system:notifs:[UID]", "system:notifs", "system:replies:[UID]" ], - "canSubscribe": [ "system:gps:*", "arena:gps:*","arena:agents:*", - "system:observer:subscribed[UID]:agents", - "system:maestro:lifecycle:[UID]" ], - "canPublish": [ "system:requests:*", "system:observer:requests" ], + "mustSubscribe": [ "system:notifs:[UID]", "system:notifs", "system:replies:[UID]" ], + "canSubscribe": [ "system:gps:*", "arena:gps:*","arena:agents:*", "arena:requests:[UID]", "arena:replies:[UID]", + "system:observer:subscribed[CUID]:agents", + "system:maestro:lifecycle:[UID]" ], + "canPublish": [ "system:requests:*", "system:observer:requests" ], "canSet": [ ], "canGet": [ ] }