New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

casbin

Package Overview
Dependencies
Maintainers
6
Versions
137
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.11.5 to 5.12.0

7

CHANGELOG.md

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

# [5.12.0](https://github.com/casbin/node-casbin/compare/v5.11.5...v5.12.0) (2022-01-16)
### Features
* **batchenforce:** added batchEnforce ([#338](https://github.com/casbin/node-casbin/issues/338)) ([56e55bd](https://github.com/casbin/node-casbin/commit/56e55bd58b0f5be4a45e753f5ad58b01a27ef8b2)), closes [#321](https://github.com/casbin/node-casbin/issues/321)
## [5.11.5](https://github.com/casbin/node-casbin/compare/v5.11.4...v5.11.5) (2021-08-18)

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

@@ -213,2 +213,9 @@ import { Effector } from './effect';

enforceEx(...rvals: any[]): Promise<[boolean, string[]]>;
/**
* batchEnforce enforces each request and returns result in a bool array.
* @param rvals the request need to be mediated, usually an array
* of array of strings, can be class instances if ABAC is used.
* @returns whether to allow the requests.
*/
batchEnforce(rvals: any[]): Promise<boolean[]>;
}

@@ -509,3 +509,12 @@ "use strict";

}
/**
* batchEnforce enforces each request and returns result in a bool array.
* @param rvals the request need to be mediated, usually an array
* of array of strings, can be class instances if ABAC is used.
* @returns whether to allow the requests.
*/
async batchEnforce(rvals) {
return await Promise.all(rvals.map((rval) => this.enforce(...rval)));
}
}
exports.CoreEnforcer = CoreEnforcer;

@@ -213,2 +213,9 @@ import { Effector } from './effect';

enforceEx(...rvals: any[]): Promise<[boolean, string[]]>;
/**
* batchEnforce enforces each request and returns result in a bool array.
* @param rvals the request need to be mediated, usually an array
* of array of strings, can be class instances if ABAC is used.
* @returns whether to allow the requests.
*/
batchEnforce(rvals: any[]): Promise<boolean[]>;
}

@@ -506,2 +506,11 @@ // Copyright 2018 The Casbin Authors. All Rights Reserved.

}
/**
* batchEnforce enforces each request and returns result in a bool array.
* @param rvals the request need to be mediated, usually an array
* of array of strings, can be class instances if ABAC is used.
* @returns whether to allow the requests.
*/
async batchEnforce(rvals) {
return await Promise.all(rvals.map((rval) => this.enforce(...rval)));
}
}

2

package.json
{
"name": "casbin",
"version": "5.11.5",
"version": "5.12.0",
"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",

@@ -17,2 +17,6 @@ # Node-Casbin

💖 [**Looking for an open-source identity and access management solution like Okta, Auth0, Keycloak ? Learn more about: Casdoor**](https://casdoor.org/)
<a href="https://casdoor.org/"><img src="https://user-images.githubusercontent.com/3787410/147868267-6ac74908-5654-4f9c-ac79-8852af9ff925.png" alt="casdoor" style="width: 50%; height: 50%"/></a>
**News**: still worry about how to write the correct `node-casbin` policy? [Casbin online editor](http://casbin.org/en/editor) is coming to help!

@@ -19,0 +23,0 @@

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