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

casbin

Package Overview
Dependencies
Maintainers
3
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 2.0.3 to 2.0.4

2

lib/enforcer.d.ts

@@ -166,3 +166,3 @@ import { ManagementEnforcer } from './managementEnforcer';

*/
getImplicitPermissionsForUser(user: string): string[][];
getImplicitPermissionsForUser(user: string, ...domain: string[]): string[][];
}

@@ -311,7 +311,13 @@ "use strict";

*/
getImplicitPermissionsForUser(user) {
const roles = [user, ...this.getImplicitRolesForUser(user)];
getImplicitPermissionsForUser(user, ...domain) {
const roles = [user, ...this.getImplicitRolesForUser(user, ...domain)];
const res = [];
const withDomain = domain && domain.length !== 0;
roles.forEach(n => {
res.push(...this.getPermissionsForUser(n));
if (withDomain) {
res.push(...this.getFilteredPolicy(0, n, ...domain));
}
else {
res.push(...this.getPermissionsForUser(n));
}
});

@@ -318,0 +324,0 @@ return res;

{
"name": "casbin",
"version": "2.0.3",
"version": "2.0.4",
"description": "An authorization library that supports access control models like ACL, RBAC, ABAC in Node.JS",

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

Sorry, the diff of this file is not supported yet

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