New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bookshelf-shield

Package Overview
Dependencies
Maintainers
6
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bookshelf-shield - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

4

lib/secureAccessMethods.js

@@ -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 @@

5

lib/Shield.js

@@ -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', () => {

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