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

flexperm

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flexperm - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

dist/lib/grant.js

2

docs/data.json

@@ -5,3 +5,3 @@ {

"description": "Permissions checking and handling for zsapi",
"version": "2.0.1"
"version": "2.0.2"
},

@@ -8,0 +8,0 @@ "files": {

@@ -540,4 +540,4 @@ // Copyright 2016 Zipscene, LLC

if (
(!curTree.perms[i].match && !remainingMatchHasKeys) ||
JSON.stringify(curTree.perms[i].match || null) ===
(!curTree.perms[i].remainingMatch && !remainingMatchHasKeys) ||
JSON.stringify(curTree.perms[i].remainingMatch || null) ===
JSON.stringify(remainingMatch)

@@ -588,3 +588,2 @@ ) {

}
return permissionsByTarget;

@@ -591,0 +590,0 @@ }

{
"name": "flexperm",
"version": "2.0.1",
"version": "2.0.2",
"description": "Flexible, granular, and fast permissions",

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

@@ -185,2 +185,30 @@ // Copyright 2016 Zipscene, LLC

it('getTargetGrant() combines non-exact match permissions correctly', function() {
let permissions = [ {
target: 'pet',
match: {
$or: [
{ animalType: 'dog' },
{ animalType: 'cat' }
]
},
grant: {
play: true
}
}, {
target: 'pet',
match: {},
grant: {
feed: true
}
} ];
let permissionSet = new PermissionSet(permissions);
testGrantValue(permissionSet.getTargetGrant('pet', {}), { feed: true });
testGrantValue(permissionSet.getTargetGrant('pet', { animalType: 'horse' }), { feed: true });
testGrantValue(permissionSet.getTargetGrant('pet', { animalType: 'cat' }), {
feed: true,
play: true
});
});
it('getTargetGrant() on admin permission', function() {

@@ -187,0 +215,0 @@ let weirdObject = {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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