@live-change/access-control-service 0.3.8 → 0.3.10

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
@@ -133,13 +133,14 @@ definition.trigger({
133
133
  }
134
134
  },
135
135
  async execute({ contactType, contact, session, objectType, object }, { service }, emit) {
136
+ console.error("INVITE WITH MESSAGE AUTHENTICATED", { contactType, contact, session, objectType, object })
136
137
  const contactTypeUpperCase = contactType[0].toUpperCase() + contactType.slice(1)
137
138
  /// Load invitation
138
139
  const invitation = App.encodeIdentifier([ contactType + '_' + contactTypeUpperCase, contact, objectType, object ])
139
140
  console.log("INVITATION", invitation)
140
141
  const invitationData = await AccessInvitation.get(invitation)
141
142
  if(!invitationData) throw 'not_found'
142
- const { roles } = invitation
143
+ const { roles } = invitationData
143
144
  /// Create account and sign-in:
144
145
  const user = app.generateUid()
145
146
  await service.trigger({
@@ -270,7 +271,7 @@ for(const contactType of config.contactTypes) {
270
271
  messageData,
271
272
  action: 'inviteWithMessage',
272
273
  actionProperties: { objectType, object },
273
- targetPage: { name: 'access:invitationAccepted', objectType, object }
274
+ targetPage: { name: 'accessControl:invitationAccepted', params: { objectType, object } }
274
275
  })
275
276
  emit({
276
277
  type: 'contactInvited',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/access-control-service",
3
- "version": "0.3.8",
3
+ "version": "0.3.10",
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.7.6"
24
+ "@live-change/framework": "0.7.8"
25
25
  },
26
- "gitHead": "0e71959c0f3c8fda8abad020d7fac70240e55f99"
26
+ "gitHead": "2517a729c452633bc3ce9725c05005a66b8f78ee"
27
27
  }