@live-change/relations-plugin 0.6.6 → 0.6.9

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/entity.js CHANGED
@@ -21,6 +21,7 @@ function defineView(config, context) {
21
21
  type: model,
22
22
  },
23
23
  access: config.access,
24
+ accessControl: config.readAccessControl || config.writeAccessControl,
24
25
  daoPath(properties, { client, context }) {
25
26
  const id = properties[modelName]
26
27
  const path = config.fields ? modelRuntime().limitedPath(id, config.fields) : modelRuntime().path(id)
@@ -85,6 +86,7 @@ function defineCreateAction(config, context) {
85
86
  ...(model.properties)
86
87
  },
87
88
  access: config.createAccess || config.writeAccess,
89
+ accessControl: config.createAccessControl || config.writeAccessControl,
88
90
  skipValidation: true,
89
91
  //queuedBy: otherPropertyNames,
90
92
  waitForEvents: true,
@@ -119,6 +121,7 @@ function defineUpdateAction(config, context) {
119
121
  ...(model.properties)
120
122
  },
121
123
  access: config.updateAccess || config.writeAccess,
124
+ accessControl: config.updateAccessControl || config.writeAccessControl,
122
125
  skipValidation: true,
123
126
  //queuedBy: otherPropertyNames,
124
127
  waitForEvents: true,
@@ -153,6 +156,7 @@ function defineDeleteAction(config, context) {
153
156
  ...(model.properties)
154
157
  },
155
158
  access: config.deleteAccess || config.writeAccess,
159
+ accessControl: config.deleteAccessControl || config.writeAccessControl,
156
160
  skipValidation: true,
157
161
  waitForEvents: true,
158
162
  async execute(properties, { client, service }, emit) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/relations-plugin",
3
- "version": "0.6.6",
3
+ "version": "0.6.9",
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.6.6",
24
+ "@live-change/framework": "^0.6.9",
25
25
  "pluralize": "8.0.0"
26
26
  },
27
- "gitHead": "d6f4e8a34d88ecf90a3bf97bb367d4c8027ce7af"
27
+ "gitHead": "d3d3afb0342113502281c3ab0e362a3c76519df5"
28
28
  }
@@ -35,6 +35,7 @@ function defineView(config, context) {
35
35
  }
36
36
  },
37
37
  access: config.readAccess,
38
+ accessControl: config.readAccessControl || config.writeAccessControl,
38
39
  daoPath(properties, { client, context }) {
39
40
  const typeAndIdParts = extractTypeAndIdParts(otherPropertyNames, properties)
40
41
  const range = extractRange(properties)
@@ -57,6 +58,7 @@ function defineCreateAction(config, context) {
57
58
  ...(model.properties)
58
59
  },
59
60
  access: config.createAccess || config.writeAccess,
61
+ accessControl: config.createAccessControl || config.writeAccessControl,
60
62
  skipValidation: true,
61
63
  //queuedBy: otherPropertyNames,
62
64
  waitForEvents: true,
@@ -96,6 +98,7 @@ function defineUpdateAction(config, context) {
96
98
  ...(model.properties)
97
99
  },
98
100
  access: config.updateAccess || config.writeAccess,
101
+ accessControl: config.updateAccessControl || config.writeAccessControl,
99
102
  skipValidation: true,
100
103
  //queuedBy: otherPropertyNames,
101
104
  waitForEvents: true,
@@ -142,6 +145,7 @@ function defineDeleteAction(config, context) {
142
145
  ...identifiers
143
146
  },
144
147
  access: config.deleteAccess || config.writeAccess,
148
+ accessControl: config.deleteAccessControl || config.writeAccessControl,
145
149
  skipValidation: true,
146
150
  //queuedBy: otherPropertyNames,
147
151
  waitForEvents: true,
@@ -29,6 +29,7 @@ function defineView(config, context) {
29
29
  }
30
30
  },
31
31
  access: config.readAccess,
32
+ accessControl: config.readAccessControl || config.writeAccessControl,
32
33
  daoPath(properties, { client, context }) {
33
34
  const idParts = extractIdParts(otherPropertyNames, properties)
34
35
  const range = extractRange(properties)
@@ -51,6 +52,7 @@ function defineCreateAction(config, context) {
51
52
  ...(model.properties)
52
53
  },
53
54
  access: config.createAccess || config.writeAccess,
55
+ accessControl: config.createAccessControl || config.writeAccessControl,
54
56
  skipValidation: true,
55
57
  //queuedBy: otherPropertyNames,
56
58
  waitForEvents: true,
@@ -86,6 +88,7 @@ function defineUpdateAction(config, context) {
86
88
  ...(model.properties)
87
89
  },
88
90
  access: config.updateAccess || config.writeAccess,
91
+ accessControl: config.updateAccessControl || config.writeAccessControl,
89
92
  skipValidation: true,
90
93
  //queuedBy: otherPropertyNames,
91
94
  waitForEvents: true,
@@ -127,6 +130,7 @@ function defineDeleteAction(config, context) {
127
130
  ...(model.properties)
128
131
  },
129
132
  access: config.deleteAccess || config.writeAccess,
133
+ accessControl: config.deleteAccessControl || config.writeAccessControl,
130
134
  skipValidation: true,
131
135
  //queuedBy: otherPropertyNames,
132
136
  waitForEvents: true,
@@ -45,7 +45,8 @@ function defineObjectView(config, context) {
45
45
  returns: {
46
46
  type: model,
47
47
  },
48
- access: config.access,
48
+ access: config.readAccess,
49
+ accessControl: config.readAccessControl || config.writeAccessControl,
49
50
  daoPath(properties, { client, context }) {
50
51
  const typeAndIdParts = extractTypeAndIdParts(otherPropertyNames, properties)
51
52
  const id = typeAndIdParts.length > 1 ? typeAndIdParts.map(p => JSON.stringify(p)).join(':') : idParts[0]
@@ -100,6 +101,7 @@ function defineSetAction(config, context) {
100
101
  ...(model.properties)
101
102
  },
102
103
  access: config.setAccess || config.writeAccess,
104
+ accessControl: config.setAccessControl || config.writeAccessControl,
103
105
  skipValidation: true,
104
106
  queuedBy: otherPropertyNames,
105
107
  waitForEvents: true,
@@ -131,6 +133,7 @@ function defineUpdateAction(config, context) {
131
133
  ...(model.properties)
132
134
  },
133
135
  access: config.updateAccess || config.writeAccess,
136
+ accessControl: config.updateAccessControl || config.writeAccessControl,
134
137
  skipValidation: true,
135
138
  queuedBy: otherPropertyNames,
136
139
  waitForEvents: true,
@@ -165,6 +168,7 @@ function defineSetOrUpdateAction(config, context) {
165
168
  ...(model.properties)
166
169
  },
167
170
  access: config.updateAccess || config.writeAccess,
171
+ accessControl: config.setAccessControl || config.writeAccessControl,
168
172
  skipValidation: true,
169
173
  queuedBy: otherPropertyNames,
170
174
  waitForEvents: true,
@@ -202,6 +206,7 @@ function defineResetAction(config, context) {
202
206
  ...identifiers
203
207
  },
204
208
  access: config.resetAccess || config.writeAccess,
209
+ accessControl: config.resetAccessControl || config.writeAccessControl,
205
210
  queuedBy: otherPropertyNames,
206
211
  waitForEvents: true,
207
212
  async execute(properties, {client, service}, emit) {
@@ -22,7 +22,8 @@ function defineView(config, context) {
22
22
  returns: {
23
23
  type: model,
24
24
  },
25
- access: config.access,
25
+ access: config.readAccess,
26
+ accessControl: config.readAccessControl || config.writeAccessControl,
26
27
  daoPath(properties, { client, context }) {
27
28
  const idParts = extractIdParts(otherPropertyNames, properties)
28
29
  const id = idParts.length > 1 ? idParts.map(p => JSON.stringify(p)).join(':') : idParts[0]
@@ -161,4 +162,4 @@ function defineResetAction(config, context) {
161
162
  })
162
163
  }
163
164
 
164
- module.exports = { defineView, defineSetAction, defineUpdateAction, defineSetOrUpdateAction, defineResetAction }
165
+ module.exports = { defineView, defineSetAction, defineUpdateAction, defineSetOrUpdateAction, defineResetAction }