@live-change/user-service 0.9.127 → 0.9.128
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/package.json +4 -4
- package/sessionOrUserItem.js +9 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/user-service",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.128",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
},
|
|
23
23
|
"type": "module",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@live-change/framework": "^0.9.
|
|
26
|
-
"@live-change/relations-plugin": "^0.9.
|
|
25
|
+
"@live-change/framework": "^0.9.128",
|
|
26
|
+
"@live-change/relations-plugin": "^0.9.128",
|
|
27
27
|
"pluralize": "^8.0.0"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "f6e19206562652cf31d6e44df80523748b694ead"
|
|
30
30
|
}
|
package/sessionOrUserItem.js
CHANGED
|
@@ -117,7 +117,7 @@ definition.processor(function(service, app) {
|
|
|
117
117
|
/// TODO: delete on userDeleted trigger
|
|
118
118
|
}
|
|
119
119
|
})*/
|
|
120
|
-
|
|
120
|
+
/*
|
|
121
121
|
if(config.ownerReadAccess) {
|
|
122
122
|
const viewName = 'my' + modelName
|
|
123
123
|
const propertyName = modelName[0].toLowerCase() + modelName.slice(1)
|
|
@@ -143,7 +143,7 @@ definition.processor(function(service, app) {
|
|
|
143
143
|
return path
|
|
144
144
|
}
|
|
145
145
|
})
|
|
146
|
-
}
|
|
146
|
+
} */
|
|
147
147
|
|
|
148
148
|
if(config.ownerReadAccess) {
|
|
149
149
|
const viewName = 'my' + pluralize(modelName)
|
|
@@ -179,6 +179,7 @@ definition.processor(function(service, app) {
|
|
|
179
179
|
|
|
180
180
|
if(config.ownerReadAccess) {
|
|
181
181
|
const viewName = 'my' + modelName
|
|
182
|
+
const propertyName = modelName[0].toLowerCase() + modelName.slice(1)
|
|
182
183
|
service.views[viewName] = new ViewDefinition({
|
|
183
184
|
name: viewName,
|
|
184
185
|
async access(params, context) {
|
|
@@ -191,7 +192,12 @@ definition.processor(function(service, app) {
|
|
|
191
192
|
}
|
|
192
193
|
return config.userReadAccess ? config.userReadAccess(params, context) : true
|
|
193
194
|
},
|
|
194
|
-
properties:
|
|
195
|
+
properties: {
|
|
196
|
+
[propertyName]: {
|
|
197
|
+
type: `${service.name}_${modelName}`,
|
|
198
|
+
validation: ['nonEmpty']
|
|
199
|
+
}
|
|
200
|
+
},
|
|
195
201
|
daoPath(params, { client, context }) {
|
|
196
202
|
const path = modelRuntime().path(params[modelPropertyName])
|
|
197
203
|
return path
|