bookshelf-shield
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -184,3 +184,7 @@ 'use strict'; | ||
function bypass(method, options) { | ||
// jscs:disable | ||
// jshint -W040 | ||
const self = this; | ||
// jshint +W040 | ||
// jscs:enable | ||
const shield = self.constructor.shield; | ||
@@ -187,0 +191,0 @@ |
@@ -129,5 +129,4 @@ 'use strict'; | ||
getApplicableRules(actionName) { | ||
const rules = _.filter(this.rules, rule => { | ||
return rule.isApplicable(actionName); | ||
}); | ||
const rules = _.filter(this.rules, | ||
rule => rule.isApplicable(actionName)); | ||
@@ -134,0 +133,0 @@ if (!rules.length) { |
{ | ||
"name": "bookshelf-shield", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "Access control list based authorization for bookshelf models", | ||
"main": "lib/main.js", | ||
"engines" : { "node" : ">=4.0.0" }, | ||
"engines": { | ||
"node": ">=4.0.0" | ||
}, | ||
"directories": { | ||
@@ -8,0 +10,0 @@ "test": "test" |
@@ -55,9 +55,7 @@ 'use strict'; | ||
describe('isApplicable', () => { | ||
it('should return true when the action matches', () => { | ||
return rule.isApplicable('test').should.be.eql(true); | ||
}); | ||
it('should return true when the action matches', | ||
() => rule.isApplicable('test').should.be.eql(true)); | ||
it('should return false when the action does not match', () => { | ||
return rule.isApplicable('somethingElse').should.be.eql(false); | ||
}); | ||
it('should return false when the action does not match', | ||
() => rule.isApplicable('somethingElse').should.be.eql(false)); | ||
}); | ||
@@ -67,5 +65,3 @@ | ||
let options; | ||
const testFn = () => { | ||
return Rule.buildGeneric(options); | ||
}; | ||
const testFn = () => Rule.buildGeneric(options); | ||
@@ -72,0 +68,0 @@ beforeEach('rebuild rule options', () => { |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
58645
1264