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

@lifeomic/abac

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lifeomic/abac - npm Package Compare versions

Comparing version 3.4.0 to 4.0.0

24

dist/index.js

@@ -180,2 +180,10 @@ 'use strict';

case 'notEquals':
if (compareValue === undefined) return undefined;
return value !== compareValue;
case 'notIn':
if (compareValue === undefined) return undefined;
return Array.isArray(compareValue) && !compareValue.includes(value);
case 'superset':

@@ -281,4 +289,8 @@ if (compareValue === undefined) return undefined;

const enforce = (operation, policy, attributes) => {
// Before using the policy, make sure it's valid
validate(policy);
try {
// Before using the policy, make sure it's valid
validate(policy);
} catch (error) {
return false;
}

@@ -308,4 +320,8 @@ // It is safe to ignore the injection attach here because the operation name has been validated

const enforceLenient = (operation, policy, attributes) => {
// Before using the policy, make sure it's valid
validate(policy);
try {
// Before using the policy, make sure it's valid
validate(policy);
} catch (error) {
return false;
}

@@ -312,0 +328,0 @@ // It is safe to ignore the injection attach here because the operation name has been validated

10

dist/schemas/Comparison.json

@@ -11,3 +11,3 @@ {

"type": "string",
"enum": ["superset", "in"]
"enum": ["superset", "in", "notIn"]
},

@@ -17,3 +17,3 @@ "value": {

"items" : {
"type": "string"
"type": ["number", "string"]
}

@@ -29,3 +29,3 @@ }

"type": "string",
"enum": ["includes", "equals"]
"enum": ["includes", "equals", "notEquals"]
},

@@ -43,3 +43,3 @@ "value": {

"type": "string",
"enum": ["superset", "in", "equals", "includes"]
"enum": ["superset", "in", "equals", "includes", "notEquals", "notIn"]
},

@@ -58,3 +58,3 @@ "target": {

"type": "string",
"not": {"enum": ["superset", "in", "equals", "includes"]}
"not": {"enum": ["superset", "in", "equals", "includes", "notEquals", "notIn"]}
}

@@ -61,0 +61,0 @@ },

@@ -213,2 +213,10 @@ 'use strict';

case 'notEquals':
if (compareValue === undefined) return undefined;
return value !== compareValue;
case 'notIn':
if (compareValue === undefined) return undefined;
return Array.isArray(compareValue) && !compareValue.includes(value);
case 'superset':

@@ -388,4 +396,8 @@ if (compareValue === undefined) return undefined;

var enforce = function enforce(operation, policy, attributes) {
// Before using the policy, make sure it's valid
validate(policy);
try {
// Before using the policy, make sure it's valid
validate(policy);
} catch (error) {
return false;
}

@@ -415,4 +427,8 @@ // It is safe to ignore the injection attach here because the operation name has been validated

var enforceLenient = function enforceLenient(operation, policy, attributes) {
// Before using the policy, make sure it's valid
validate(policy);
try {
// Before using the policy, make sure it's valid
validate(policy);
} catch (error) {
return false;
}

@@ -419,0 +435,0 @@ // It is safe to ignore the injection attach here because the operation name has been validated

@@ -11,3 +11,3 @@ {

"type": "string",
"enum": ["superset", "in"]
"enum": ["superset", "in", "notIn"]
},

@@ -17,3 +17,3 @@ "value": {

"items" : {
"type": "string"
"type": ["number", "string"]
}

@@ -29,3 +29,3 @@ }

"type": "string",
"enum": ["includes", "equals"]
"enum": ["includes", "equals", "notEquals"]
},

@@ -43,3 +43,3 @@ "value": {

"type": "string",
"enum": ["superset", "in", "equals", "includes"]
"enum": ["superset", "in", "equals", "includes", "notEquals", "notIn"]
},

@@ -58,3 +58,3 @@ "target": {

"type": "string",
"not": {"enum": ["superset", "in", "equals", "includes"]}
"not": {"enum": ["superset", "in", "equals", "includes", "notEquals", "notIn"]}
}

@@ -61,0 +61,0 @@ },

@@ -156,2 +156,10 @@ 'use strict';

case 'notEquals':
if (compareValue === undefined) return undefined;
return value !== compareValue;
case 'notIn':
if (compareValue === undefined) return undefined;
return Array.isArray(compareValue) && !compareValue.includes(value);
case 'superset':

@@ -257,4 +265,8 @@ if (compareValue === undefined) return undefined;

const enforce = (operation, policy, attributes) => {
// Before using the policy, make sure it's valid
validate(policy);
try {
// Before using the policy, make sure it's valid
validate(policy);
} catch (error) {
return false;
}

@@ -284,4 +296,8 @@ // It is safe to ignore the injection attach here because the operation name has been validated

const enforceLenient = (operation, policy, attributes) => {
// Before using the policy, make sure it's valid
validate(policy);
try {
// Before using the policy, make sure it's valid
validate(policy);
} catch (error) {
return false;
}

@@ -288,0 +304,0 @@ // It is safe to ignore the injection attach here because the operation name has been validated

@@ -11,3 +11,3 @@ {

"type": "string",
"enum": ["superset", "in"]
"enum": ["superset", "in", "notIn"]
},

@@ -17,3 +17,3 @@ "value": {

"items" : {
"type": "string"
"type": ["number", "string"]
}

@@ -29,3 +29,3 @@ }

"type": "string",
"enum": ["includes", "equals"]
"enum": ["includes", "equals", "notEquals"]
},

@@ -43,3 +43,3 @@ "value": {

"type": "string",
"enum": ["superset", "in", "equals", "includes"]
"enum": ["superset", "in", "equals", "includes", "notEquals", "notIn"]
},

@@ -58,3 +58,3 @@ "target": {

"type": "string",
"not": {"enum": ["superset", "in", "equals", "includes"]}
"not": {"enum": ["superset", "in", "equals", "includes", "notEquals", "notIn"]}
}

@@ -61,0 +61,0 @@ },

{
"name": "@lifeomic/abac",
"version": "3.4.0",
"version": "4.0.0",
"description": "Lifeomic Attribute Based Access Control Support Module",

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

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