casbin 5.13.1 → 5.13.2
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [5.13.2](https://github.com/casbin/node-casbin/compare/v5.13.1...v5.13.2) (2022-03-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* *matcher result should be boolean or number* for KeyGet2 ([#347](https://github.com/casbin/node-casbin/issues/347)) ([0257078](https://github.com/casbin/node-casbin/commit/0257078e1302f5ef081ec143afe5c470f4f862e9))
|
|
7
|
+
|
|
1
8
|
## [5.13.1](https://github.com/casbin/node-casbin/compare/v5.13.0...v5.13.1) (2022-02-22)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
p, alice, /data/:id
|
package/lib/cjs/coreEnforcer.js
CHANGED
|
@@ -387,8 +387,16 @@ class CoreEnforcer {
|
|
|
387
387
|
eftRes = result;
|
|
388
388
|
}
|
|
389
389
|
break;
|
|
390
|
+
case 'string':
|
|
391
|
+
if (result === '') {
|
|
392
|
+
eftRes = effect_1.Effect.Indeterminate;
|
|
393
|
+
}
|
|
394
|
+
else {
|
|
395
|
+
eftRes = effect_1.Effect.Allow;
|
|
396
|
+
}
|
|
397
|
+
break;
|
|
390
398
|
default:
|
|
391
|
-
throw new Error('matcher result should be boolean or
|
|
399
|
+
throw new Error('matcher result should only be of type boolean, number, or string');
|
|
392
400
|
}
|
|
393
401
|
const eft = parameters['p_eft'];
|
|
394
402
|
if (eft && eftRes === effect_1.Effect.Allow) {
|
package/lib/esm/coreEnforcer.js
CHANGED
|
@@ -384,8 +384,16 @@ export class CoreEnforcer {
|
|
|
384
384
|
eftRes = result;
|
|
385
385
|
}
|
|
386
386
|
break;
|
|
387
|
+
case 'string':
|
|
388
|
+
if (result === '') {
|
|
389
|
+
eftRes = Effect.Indeterminate;
|
|
390
|
+
}
|
|
391
|
+
else {
|
|
392
|
+
eftRes = Effect.Allow;
|
|
393
|
+
}
|
|
394
|
+
break;
|
|
387
395
|
default:
|
|
388
|
-
throw new Error('matcher result should be boolean or
|
|
396
|
+
throw new Error('matcher result should only be of type boolean, number, or string');
|
|
389
397
|
}
|
|
390
398
|
const eft = parameters['p_eft'];
|
|
391
399
|
if (eft && eftRes === Effect.Allow) {
|
package/package.json
CHANGED