@live-change/access-control-service 0.2.49 → 0.2.51
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/access.js +1 -0
- package/accessControl.js +1 -1
- package/package.json +3 -3
package/access.js
CHANGED
|
@@ -17,6 +17,7 @@ module.exports = (definition) => {
|
|
|
17
17
|
} = config
|
|
18
18
|
|
|
19
19
|
function testRoles(requiredRoles, clientRoles) {
|
|
20
|
+
if(!requiredRoles || requiredRoles.length == 0) return true
|
|
20
21
|
for(const requiredRolesOption of requiredRoles) {
|
|
21
22
|
if(
|
|
22
23
|
(Array.isArray(requiredRolesOption) ? requiredRolesOption : [requiredRolesOption])
|
package/accessControl.js
CHANGED
|
@@ -85,7 +85,7 @@ definition.processor({
|
|
|
85
85
|
const rolesObservable = app.dao.observable(rolesPath)
|
|
86
86
|
const rolesObserver = (signal, value) => {
|
|
87
87
|
const accessObject = rolesObservable.getValue()
|
|
88
|
-
const newAccessible = access.testRoles(config.roles, accessObject.roles)
|
|
88
|
+
const newAccessible = accessObject ? access.testRoles(config.roles, accessObject.roles) : false
|
|
89
89
|
if(newAccessible !== accessible) {
|
|
90
90
|
if(newAccessible === true /*&& !valueObservable*/) {
|
|
91
91
|
valueObservable = oldObservable.apply(view, args)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/access-control-service",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.51",
|
|
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.6.
|
|
24
|
+
"@live-change/framework": "0.6.14"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "0f25467a8e4d5050355b407aca0060b08824f024"
|
|
27
27
|
}
|