@live-change/access-control-service 0.9.181 → 0.9.182

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/access.js CHANGED
@@ -191,7 +191,8 @@ export default (definition) => {
191
191
  return node
192
192
  }
193
193
  function computeNodeRoles(node) {
194
- const parentsRoles = node.parents.map(parent => computeNodeRoles(parent)).flat()
194
+ const parentsRoles = node.parents.map(parent => computeNodeRoles(parent)).flat()
195
+ //output.debug('computeNodeRoles', node.objectType, node.object, parentsRoles, 'FOR', client)
195
196
  return Array.from(new Set([
196
197
  ...parentsRoles,
197
198
  ...node.publicUserRoles,
package/accessControl.js CHANGED
@@ -63,10 +63,12 @@ definition.processor({
63
63
  if(objects.length === 0) {
64
64
  throw new Error('no objects for access control to work in view ' + viewName)
65
65
  }
66
- /*console.log("OBJECTS", objects)
66
+ /* console.log("ACCESS CONTROL", service.name, "VIEW", view.name, "CONFIG", config)
67
+ console.log("OBJECTS", objects)
67
68
  console.log("CLIENT", client)
68
- console.log("ROLES", config.roles)*/
69
+ console.log("ROLES", config.roles) */
69
70
  const accessible = await access.clientHasAccessRoles(client, { objects }, config.roles)
71
+ //console.log("ACCESSIBLE", accessible)
70
72
  if(!accessible) throw 'notAuthorized'
71
73
  return oldGet.apply(view, args)
72
74
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/access-control-service",
3
- "version": "0.9.181",
3
+ "version": "0.9.182",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -21,8 +21,8 @@
21
21
  "url": "https://www.viamage.com/"
22
22
  },
23
23
  "dependencies": {
24
- "@live-change/framework": "^0.9.181"
24
+ "@live-change/framework": "^0.9.182"
25
25
  },
26
- "gitHead": "fe35a6d7dd3fd552097ad241b062cc6114543ef6",
26
+ "gitHead": "e12068c10b76a5661032a3df85d7168f228192af",
27
27
  "type": "module"
28
28
  }