access-right
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -45,3 +45,3 @@ { | ||
}, | ||
"version": "2.0.1" | ||
"version": "2.0.2" | ||
} |
@@ -91,3 +91,10 @@ var uut = require('../'); | ||
}); | ||
it('test #3: work with multiple required rights and subrights', () => { | ||
const has = ['a.b']; | ||
const needs = ['a.a', 'a.b']; | ||
const result = uut.isAllowed(has, needs); | ||
expect(result).toBe(true); | ||
}); | ||
}); | ||
}); |
@@ -35,5 +35,5 @@ var _CONST = { | ||
has.forEach(function(right) { | ||
right = escapeRegExp(right); | ||
var regExp = new RegExp('^' + right + '(\\.[a-zA-Z0-9_\\.]*)*$'); | ||
requires.forEach(function(required) { | ||
right = escapeRegExp(right); | ||
var regExp = new RegExp('^' + right + '(\\.[a-zA-Z0-9_\\.]*)*$'); | ||
found = found || regExp.test(required); | ||
@@ -40,0 +40,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9211
125