@live-change/access-control-service 0.8.51 → 0.8.52
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 +3 -3
- package/view.js +3 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/access-control-service",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.52",
|
|
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.8.
|
|
24
|
+
"@live-change/framework": "^0.8.52"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "d06ad62415cc92e15b5dee87078614d4f883eb83",
|
|
27
27
|
"type": "module"
|
|
28
28
|
}
|
package/view.js
CHANGED
|
@@ -89,7 +89,8 @@ definition.view({
|
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
91
|
async daoPath(properties, { client, service }, method) {
|
|
92
|
-
const [ sessionOrUserType, sessionOrUser ] =
|
|
92
|
+
const [ sessionOrUserType, sessionOrUser ] =
|
|
93
|
+
client.user ? ['user_User', client.user] : ['session_Session', client.session]
|
|
93
94
|
const { objectType } = properties
|
|
94
95
|
return Access.rangePath([sessionOrUserType, sessionOrUser, objectType], App.extractRange(properties))
|
|
95
96
|
}
|
|
@@ -116,9 +117,7 @@ definition.view({
|
|
|
116
117
|
const [ sessionOrUserType, sessionOrUser ] =
|
|
117
118
|
client.user ? ['user_User', client.user] : ['session_Session', client.session]
|
|
118
119
|
const { objectType, role } = properties
|
|
119
|
-
|
|
120
|
+
return Access.indexRangePath('byOwnerRoleAndObject',
|
|
120
121
|
[sessionOrUserType, sessionOrUser, role, objectType], App.extractRange(properties))
|
|
121
|
-
console.log("PATH", path)
|
|
122
|
-
return path
|
|
123
122
|
}
|
|
124
123
|
})
|