Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

casbin

Package Overview
Dependencies
Maintainers
6
Versions
135
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

casbin - npm Package Compare versions

Comparing version 5.15.0 to 5.15.1

7

CHANGELOG.md

@@ -0,1 +1,8 @@

## [5.15.1](https://github.com/casbin/node-casbin/compare/v5.15.0...v5.15.1) (2022-04-27)
### Bug Fixes
* EnforceEx return allow reason ([#363](https://github.com/casbin/node-casbin/issues/363)) ([6353283](https://github.com/casbin/node-casbin/commit/635328328caf200093e89443d32e9f2fa736509a))
# [5.15.0](https://github.com/casbin/node-casbin/compare/v5.14.0...v5.15.0) (2022-04-15)

@@ -2,0 +9,0 @@

6

lib/cjs/coreEnforcer.js

@@ -413,5 +413,7 @@ "use strict";

}
const [res, done] = effectStream.pushEffect(eftRes);
const [res, rec, done] = effectStream.pushEffect(eftRes);
if (rec) {
explainIndex = i;
}
if (done) {
explainIndex = i;
break;

@@ -418,0 +420,0 @@ }

@@ -9,6 +9,7 @@ import { EffectorStream } from './effectorStream';

private res;
private rec;
private readonly expr;
constructor(expr: string);
current(): boolean;
pushEffect(eft: Effect): [boolean, boolean];
pushEffect(eft: Effect): [boolean, boolean, boolean];
}

@@ -25,2 +25,3 @@ "use strict";

this.res = false;
this.rec = false;
this.expr = expr;

@@ -37,2 +38,3 @@ }

this.done = true;
this.rec = true;
}

@@ -45,2 +47,3 @@ break;

this.done = true;
this.rec = true;
}

@@ -51,2 +54,3 @@ break;

this.res = true;
this.rec = true;
}

@@ -56,3 +60,7 @@ else if (eft === effector_1.Effect.Deny) {

this.done = true;
this.rec = true;
}
else {
this.rec = false;
}
break;

@@ -63,2 +71,3 @@ case 'priority(p_eft) || deny':

this.done = true;
this.rec = true;
}

@@ -69,5 +78,5 @@ break;

}
return [this.res, this.done];
return [this.res, this.rec, this.done];
}
}
exports.DefaultEffectorStream = DefaultEffectorStream;
import { Effect } from './effector';
export interface EffectorStream {
current(): boolean;
pushEffect(eft: Effect): [boolean, boolean];
pushEffect(eft: Effect): [boolean, boolean, boolean];
}

@@ -410,5 +410,7 @@ // Copyright 2018 The Casbin Authors. All Rights Reserved.

}
const [res, done] = effectStream.pushEffect(eftRes);
const [res, rec, done] = effectStream.pushEffect(eftRes);
if (rec) {
explainIndex = i;
}
if (done) {
explainIndex = i;
break;

@@ -415,0 +417,0 @@ }

@@ -9,6 +9,7 @@ import { EffectorStream } from './effectorStream';

private res;
private rec;
private readonly expr;
constructor(expr: string);
current(): boolean;
pushEffect(eft: Effect): [boolean, boolean];
pushEffect(eft: Effect): [boolean, boolean, boolean];
}

@@ -22,2 +22,3 @@ // Copyright 2020 The Casbin Authors. All Rights Reserved.

this.res = false;
this.rec = false;
this.expr = expr;

@@ -34,2 +35,3 @@ }

this.done = true;
this.rec = true;
}

@@ -42,2 +44,3 @@ break;

this.done = true;
this.rec = true;
}

@@ -48,2 +51,3 @@ break;

this.res = true;
this.rec = true;
}

@@ -53,3 +57,7 @@ else if (eft === Effect.Deny) {

this.done = true;
this.rec = true;
}
else {
this.rec = false;
}
break;

@@ -60,2 +68,3 @@ case 'priority(p_eft) || deny':

this.done = true;
this.rec = true;
}

@@ -66,4 +75,4 @@ break;

}
return [this.res, this.done];
return [this.res, this.rec, this.done];
}
}
import { Effect } from './effector';
export interface EffectorStream {
current(): boolean;
pushEffect(eft: Effect): [boolean, boolean];
pushEffect(eft: Effect): [boolean, boolean, boolean];
}
{
"name": "casbin",
"version": "5.15.0",
"version": "5.15.1",
"description": "An authorization library that supports access control models like ACL, RBAC, ABAC in Node.JS",

@@ -5,0 +5,0 @@ "main": "lib/cjs/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc