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 1.2.2 to 1.3.0

49

dist/index.js

@@ -347,2 +347,48 @@ 'use strict';

/**
* Check whether the given policy allows one of a list of operations
* with the given attributes.
* @param {string[]} operations - the requested operations
* @param {object} policy - the policy to use to check access
* @param {object} attributes - the attributes to use to check access
* @returns {boolean|string} - the first allowed operation or false
* @throws {Error} Error if the policy is invalid
*/
const enforceAny = (() => {
var _ref5 = (0, _asyncToGenerator3.default)(function* (operations, policy, attributes) {
var _iteratorNormalCompletion5 = true;
var _didIteratorError5 = false;
var _iteratorError5 = undefined;
try {
for (var _iterator5 = (0, _getIterator3.default)(operations), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {
const operation = _step5.value;
if (yield enforce(operation, policy, attributes)) {
return operation;
}
}
} catch (err) {
_didIteratorError5 = true;
_iteratorError5 = err;
} finally {
try {
if (!_iteratorNormalCompletion5 && _iterator5.return) {
_iterator5.return();
}
} finally {
if (_didIteratorError5) {
throw _iteratorError5;
}
}
}
return false;
});
return function enforceAny(_x6, _x7, _x8) {
return _ref5.apply(this, arguments);
};
})();
module.exports = {

@@ -353,3 +399,4 @@ validate,

enforce,
enforceSync
enforceSync,
enforceAny
};

2

package.json
{
"name": "@lifeomic/abac",
"version": "1.2.2",
"version": "1.3.0",
"description": "Lifeomic Attribute Based Access Control Support Module",

@@ -5,0 +5,0 @@ "main": "dist/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