@live-change/access-control-service 0.3.9 → 0.3.11
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/invite.js +3 -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 } =
|
|
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: '
|
|
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.
|
|
3
|
+
"version": "0.3.11",
|
|
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.
|
|
24
|
+
"@live-change/framework": "0.7.10"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "28266e891c65757f38826f323273264f9c2d320b"
|
|
27
27
|
}
|