removed [CNXID] cursor delirium, changed frustum chan to [CUID]
This commit is contained in:
+2
-2
@@ -11,9 +11,9 @@ export class AccesRights {
|
|||||||
}
|
}
|
||||||
|
|
||||||
expandPattern(pattern, uid, cnxId=null) {
|
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)
|
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)
|
return(item)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -21,7 +21,7 @@ export const methods = {
|
|||||||
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)
|
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.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)
|
if(this.debug) console.log('SUB: No rights to this chan!', this.userId, this.roles, chan)
|
||||||
continue
|
continue
|
||||||
@@ -75,7 +75,7 @@ export const methods = {
|
|||||||
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)
|
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
|
if(this.accessRights.isMandatory(this.userId, this.roles, chan, this.uuid)) continue
|
||||||
|
|
||||||
let couldUnsubscribe = false
|
let couldUnsubscribe = false
|
||||||
@@ -231,7 +231,7 @@ export const methods = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
payload.channel = payload.channel.replace(/\[UID\]/g, this.userId)
|
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)) ) {
|
if( (!this.accessRights.canSubscribe(this.userId, this.roles, payload.channel, this.uuid)) ) {
|
||||||
this.sendErr(action, 'CHANHIST: Unauthorized channel !', reqid)
|
this.sendErr(action, 'CHANHIST: Unauthorized channel !', reqid)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -15,11 +15,11 @@
|
|||||||
"accessRights":[
|
"accessRights":[
|
||||||
{
|
{
|
||||||
"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:*", "arena:requests:[UID]", "arena:replies:[UID]",
|
||||||
"system:observer:subscribed[UID]:agents",
|
"system:observer:subscribed[CUID]: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