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": [ ] }