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) {
|
||||
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)
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -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
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
{
|
||||
"roles": "*",
|
||||
"mustSubscribe": [ "system:notifs:[UID]", "system:notifs", "system:replies:[UID]" ],
|
||||
"canSubscribe": [ "system:gps:*", "arena:gps:*","arena:agents:*",
|
||||
"system:observer:subscribed[UID]:agents",
|
||||
"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": [ ],
|
||||
|
||||
Reference in New Issue
Block a user