@live-change/access-control-service
Advanced tools
Comparing version 0.8.83 to 0.8.84
@@ -119,3 +119,6 @@ import App from '@live-change/framework' | ||
indexes: { | ||
byOwnerRoleAndObject: { | ||
property: ['contactOrUserType', 'contactOrUser', 'roles', 'objectType', 'object'], | ||
multi: true | ||
} | ||
} | ||
@@ -122,0 +125,0 @@ }) |
{ | ||
"name": "@live-change/access-control-service", | ||
"version": "0.8.83", | ||
"version": "0.8.84", | ||
"description": "", | ||
@@ -24,6 +24,6 @@ "main": "index.js", | ||
"dependencies": { | ||
"@live-change/framework": "^0.8.83" | ||
"@live-change/framework": "^0.8.84" | ||
}, | ||
"gitHead": "a3c85f0869b4c65c2bdd6f181bdfcbe2d6f2bde5", | ||
"gitHead": "53f9ddc7529c28f12cb77c4a2758b553461e46b6", | ||
"type": "module" | ||
} |
50
view.js
@@ -8,3 +8,3 @@ import definition from './definition.js' | ||
import { Access } from './model.js' | ||
import { Access, AccessInvitation } from './model.js' | ||
@@ -125,1 +125,49 @@ definition.view({ | ||
}) | ||
definition.view({ | ||
name: 'myAccessInvitationsByObjectType', | ||
properties: { | ||
objectType: { | ||
type: String | ||
}, | ||
...App.rangeProperties | ||
}, | ||
returns: { | ||
type: Array, | ||
of: { | ||
type: Access | ||
} | ||
}, | ||
async daoPath(properties, { client, service }, method) { | ||
const [ sessionOrUserType, sessionOrUser ] = | ||
client.user ? ['user_User', client.user] : ['session_Session', client.session] | ||
const { objectType } = properties | ||
return AccessInvitation.rangePath([sessionOrUserType, sessionOrUser, objectType], App.extractRange(properties)) | ||
} | ||
}) | ||
definition.view({ | ||
name: 'myAccessInvitationsByObjectTypeAndRole', | ||
properties: { | ||
objectType: { | ||
type: String | ||
}, | ||
role: { | ||
type: String | ||
}, | ||
...App.rangeProperties | ||
}, | ||
returns: { | ||
type: Array, | ||
of: { | ||
type: Access | ||
} | ||
}, | ||
async daoPath(properties, { client, service }, method) { | ||
const [ sessionOrUserType, sessionOrUser ] = | ||
client.user ? ['user_User', client.user] : ['session_Session', client.session] | ||
const { objectType, role } = properties | ||
return AccessInvitation.indexRangePath('byOwnerRoleAndObject', | ||
[sessionOrUserType, sessionOrUser, role, objectType], App.extractRange(properties)) | ||
} | ||
}) |
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
39550
1041