@live-change/access-control-service 0.2.42 → 0.2.44

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.
Files changed (2) hide show
  1. package/invite.js +3 -2
  2. package/package.json +3 -3
package/invite.js CHANGED
@@ -221,7 +221,10 @@ for(const contactType of config.contactTypes) {
221
221
  access: (params, { client, context, visibilityTest }) =>
222
222
  visibilityTest || access.clientCanInvite(client, params),
223
223
  async execute(params, { client, service }, emit) {
224
+ const { [contactTypeName]: contact } = params
225
+ const { objectType, object } = params
224
226
  const { roles } = params
227
+
225
228
  const myRoles = await access.getClientObjectRoles(client, { objectType, object }, true)
226
229
  if(!myRoles.includes('administrator')) {
227
230
  for(const requestedRole of roles) {
@@ -230,8 +233,6 @@ for(const contactType of config.contactTypes) {
230
233
  }
231
234
 
232
235
  const [ fromType, from ] = client.user ? ['user_User', client.user] : ['session_Session', client.session]
233
- const { [contactTypeName]: contact } = params
234
- const { objectType, object } = params
235
236
  const invitationData = { fromType, from }
236
237
  for(const propertyName in invitationProperties) invitationData[propertyName] = params[propertyName]
237
238
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/access-control-service",
3
- "version": "0.2.42",
3
+ "version": "0.2.44",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -21,7 +21,7 @@
21
21
  "url": "https://www.viamage.com/"
22
22
  },
23
23
  "dependencies": {
24
- "@live-change/framework": "0.6.9"
24
+ "@live-change/framework": "0.6.10"
25
25
  },
26
- "gitHead": "ad7e746f87b5c7be7d040885ca228aab2ec2f23e"
26
+ "gitHead": "aded4481299d6f56450603608cf1b0ec199156c5"
27
27
  }