new chans in config, & allow SUB by template for [UID], and added cnxId & [CUID]
This commit is contained in:
@@ -20,6 +20,7 @@ export const methods = {
|
|||||||
let subscribed = []
|
let subscribed = []
|
||||||
for(var chan of payload){
|
for(var chan of payload){
|
||||||
if((!chan) || (typeof(chan)!='string')) continue
|
if((!chan) || (typeof(chan)!='string')) continue
|
||||||
|
chan = chan.replace(/\[UID\]/g, this.userId)
|
||||||
if(!this.accessRights.canSubscribe(this.userId, this.roles, chan)) {
|
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)
|
if(this.debug) console.log('SUB: No rights to this chan!', this.userId, this.roles, chan)
|
||||||
continue
|
continue
|
||||||
@@ -72,6 +73,7 @@ export const methods = {
|
|||||||
let unSubscribed = []
|
let unSubscribed = []
|
||||||
for(var chan of payload){
|
for(var chan of payload){
|
||||||
if((!chan) || (typeof(chan)!='string')) continue
|
if((!chan) || (typeof(chan)!='string')) continue
|
||||||
|
chan = chan.replace(/\[UID\]/g, this.userId)
|
||||||
if(this.accessRights.isMandatory(this.userId, this.roles, chan)) continue
|
if(this.accessRights.isMandatory(this.userId, this.roles, chan)) continue
|
||||||
|
|
||||||
let couldUnsubscribe = false
|
let couldUnsubscribe = false
|
||||||
|
|||||||
@@ -16,10 +16,10 @@
|
|||||||
{
|
{
|
||||||
"roles": "*",
|
"roles": "*",
|
||||||
"mustSubscribe": [ "system:notifs:[UID]", "system:notifs", "system:replies:[UID]" ],
|
"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:observer:subscribed[UID]:agents",
|
||||||
"system:maestro:lifecycle:[UID]"],
|
"system:maestro:lifecycle:[UID]" ],
|
||||||
"canPublish": [ "system:requests:*", "system:observer:requests"],
|
"canPublish": [ "system:requests:*", "system:observer:requests" ],
|
||||||
"canSet": [ ],
|
"canSet": [ ],
|
||||||
"canGet": [ ]
|
"canGet": [ ]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user