@live-change/access-control-service
Advanced tools
Comparing version 0.8.82 to 0.8.83
@@ -111,10 +111,4 @@ import { parents, parentsSources } from './accessControlParents.js' | ||
async function checkRoles(client, { objectType, object, objects }, callback, ignorePublic) { | ||
const allObjects = ((objectType && object) ? [{ objectType, object }] : []).concat(objects || []) | ||
const roles = await getClientObjectsRoles(client, allObjects, ignorePublic) | ||
//console.log('checkRoles', allObjects, roles) | ||
//console.trace("CHECK ROLES!") | ||
return await callback(roles, client, { objectType, object }) | ||
} | ||
/// QUERIES: | ||
@@ -313,16 +307,12 @@ | ||
/* | ||
function accessLimitedGet(client, objects, requiredRoles, path) { | ||
const roles = getClientObjectsRoles(client, objects) | ||
for(const requiredRole of requiredRoles) { | ||
} | ||
async function checkRoles(client, { objectType, object, objects }, callback, ignorePublic) { | ||
const allObjects = ((objectType && object) ? [{ objectType, object }] : []).concat(objects || []) | ||
//const roles = await getClientObjectsRoles(client, allObjects, ignorePublic) | ||
const access = await app.dao.get(accessPath(client, allObjects)) | ||
const roles = access.roles | ||
//console.log('checkRoles', allObjects, roles) | ||
//console.trace("CHECK ROLES!") | ||
return await callback(roles, client, { objectType, object }) | ||
} | ||
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] === '' | ||
} | ||
*/ | ||
return { | ||
@@ -329,0 +319,0 @@ testRoles, |
@@ -139,3 +139,5 @@ import App from '@live-change/framework' | ||
/// Load invitation | ||
const invitation = App.encodeIdentifier([ contactType + '_' + contactTypeUpperCase, contact, objectType, object ]) | ||
const invitation = App.encodeIdentifier([ | ||
contactType + '_' + contactTypeUpperCase, contact, objectType, object | ||
]) | ||
console.log("INVITATION", invitation) | ||
@@ -142,0 +144,0 @@ const invitationData = await AccessInvitation.get(invitation) |
{ | ||
"name": "@live-change/access-control-service", | ||
"version": "0.8.82", | ||
"version": "0.8.83", | ||
"description": "", | ||
@@ -24,6 +24,6 @@ "main": "index.js", | ||
"dependencies": { | ||
"@live-change/framework": "^0.8.82" | ||
"@live-change/framework": "^0.8.83" | ||
}, | ||
"gitHead": "72f303118f6bb5e324c5d77473b456fc10f7ed04", | ||
"gitHead": "a3c85f0869b4c65c2bdd6f181bdfcbe2d6f2bde5", | ||
"type": "module" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38145
992