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

access-right

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

access-right - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

2

package.json

@@ -45,3 +45,3 @@ {

},
"version": "2.0.2"
"version": "v2.0.3"
}

@@ -92,2 +92,12 @@ var uut = require('../');

it('test #2: is Allowed should return true for - in rights', () => {
const has = ['filebrowser.local.read'];
const needs = 'filebrowser.local.read.demo-test';
const result = uut.isAllowed(has, needs);
expect(result).toBe(true);
});
it('test #3: work with multiple required rights and subrights', () => {

@@ -94,0 +104,0 @@ const has = ['a.b'];

@@ -36,3 +36,3 @@ var _CONST = {

right = escapeRegExp(right);
var regExp = new RegExp('^' + right + '(\\.[a-zA-Z0-9_\\.]*)*$');
var regExp = new RegExp('^' + right + '(\\.[a-zA-Z0-9_\\-\\.]*)*$');
requires.forEach(function(required) {

@@ -39,0 +39,0 @@ found = found || regExp.test(required);

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