refactored to MP...debugs starts now
This commit is contained in:
@@ -13,7 +13,6 @@ module.exports = class RedisConnexion {
|
|||||||
this.cfgh = options.cfgh
|
this.cfgh = options.cfgh
|
||||||
this.midasSubscriptions = []
|
this.midasSubscriptions = []
|
||||||
this.accessRights = new AccesRights(this.config, options.debug)
|
this.accessRights = new AccesRights(this.config, options.debug)
|
||||||
this.AWScodeCommitRole = 'arn:aws:iam::959160311435:role/EIC-CodeCommitReader'
|
|
||||||
|
|
||||||
// Plugins related
|
// Plugins related
|
||||||
this.plugins = {}
|
this.plugins = {}
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ export class AccesRights {
|
|||||||
}
|
}
|
||||||
|
|
||||||
canPublish(uid, roles, myChan) {
|
canPublish(uid, roles, myChan) {
|
||||||
myChan = myChan.startsWith(this.config.redis.basePrefix) ? myChan.substr(this.config.redis.basePrefix.length) : myChan
|
|
||||||
if(roles.indexOf('*')<0) roles.push('*')
|
if(roles.indexOf('*')<0) roles.push('*')
|
||||||
for(let myRole of roles){
|
for(let myRole of roles){
|
||||||
for(let rightBlock of this.rights) {
|
for(let rightBlock of this.rights) {
|
||||||
@@ -60,7 +59,6 @@ export class AccesRights {
|
|||||||
}
|
}
|
||||||
|
|
||||||
canSet(uid, roles, myKey){
|
canSet(uid, roles, myKey){
|
||||||
myKey = myKey.startsWith(this.config.redis.storePrefix) ? myKey.substr(this.config.redis.storePrefix.length) : myKey
|
|
||||||
if(roles.indexOf('*')<0) roles.push('*')
|
if(roles.indexOf('*')<0) roles.push('*')
|
||||||
for(let myRole of roles){
|
for(let myRole of roles){
|
||||||
for(let rightBlock of this.rights) {
|
for(let rightBlock of this.rights) {
|
||||||
@@ -76,7 +74,6 @@ export class AccesRights {
|
|||||||
}
|
}
|
||||||
|
|
||||||
canGet(uid, roles, myKey){
|
canGet(uid, roles, myKey){
|
||||||
myKey = myKey.startsWith(this.config.redis.storePrefix) ? myKey.substr(this.config.redis.storePrefix.length) : myKey
|
|
||||||
if(roles.indexOf('*')<0) roles.push('*')
|
if(roles.indexOf('*')<0) roles.push('*')
|
||||||
for(let myRole of roles){
|
for(let myRole of roles){
|
||||||
for(let rightBlock of this.rights) {
|
for(let rightBlock of this.rights) {
|
||||||
|
|||||||
@@ -33,11 +33,6 @@ export class configHelper {
|
|||||||
this.config = curConfig
|
this.config = curConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
async refreshAccessRightsDynamo(){
|
|
||||||
let ar = await this.dynamoGet('accessRights')
|
|
||||||
this.config.accessRights = ar
|
|
||||||
}
|
|
||||||
|
|
||||||
async refreshAccessRightsFile(){
|
async refreshAccessRightsFile(){
|
||||||
let tmp
|
let tmp
|
||||||
try { tmp = import(`${this.localfile}?update=${Date.now()}`, { assert: { type: 'json' } }) }
|
try { tmp = import(`${this.localfile}?update=${Date.now()}`, { assert: { type: 'json' } }) }
|
||||||
|
|||||||
Reference in New Issue
Block a user