@live-change/access-control-service
Advanced tools
Comparing version 0.8.34 to 0.8.35
@@ -20,3 +20,3 @@ import { parents, parentsSources } from './accessControlParents.js' | ||
function testRoles(requiredRoles, clientRoles) { | ||
if(!requiredRoles || requiredRoles.length == 0) return true | ||
if(!requiredRoles || requiredRoles.length === 0) return true | ||
for(const requiredRolesOption of requiredRoles) { | ||
@@ -108,2 +108,3 @@ if( | ||
const roles = await getClientObjectsRoles(client, allObjects, ignorePublic) | ||
console.log('checkRoles', allObjects, roles) | ||
return await callback(roles, client, { objectType, object }) | ||
@@ -303,4 +304,4 @@ } | ||
function accessLimitedObservable(client, objects, path) { | ||
if(path[0] != 'database') throw new Error("non database path "+ JSON.stringify(path)) | ||
const isObject = path[1] == 'queryObject' || path[1] == '' | ||
if(path[0] !== 'database') throw new Error("non database path "+ JSON.stringify(path)) | ||
const isObject = path[1] === 'queryObject' || path[1] === '' | ||
} | ||
@@ -307,0 +308,0 @@ |
@@ -17,2 +17,3 @@ import definition from './definition.js' | ||
const config = action.accessControl | ||
if(config.public) continue | ||
@@ -19,0 +20,0 @@ console.log("ACCESS CONTROL", service.name, "ACTION", action.name) |
{ | ||
"name": "@live-change/access-control-service", | ||
"version": "0.8.34", | ||
"version": "0.8.35", | ||
"description": "", | ||
@@ -24,6 +24,6 @@ "main": "index.js", | ||
"dependencies": { | ||
"@live-change/framework": "^0.8.34" | ||
"@live-change/framework": "^0.8.35" | ||
}, | ||
"gitHead": "40e61928bf43b35352c76fc135f36a2d8bd76c4a", | ||
"gitHead": "90fbb746dc7270895daf17b437ca48c0b0a01c01", | ||
"type": "module" | ||
} |
36193
927