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

accesscontrol

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

accesscontrol - npm Package Compare versions

Comparing version 1.5.1 to 1.5.2

4

CHANGELOG.md
## AccessControl - Change Log
### **v1.5.2** (2017-07-02)
- Fixed an issue where the grants were not processed into the inner grants object structure; if an array is passed to `AccessControl` constructor. Fixes [issue #10](https://github.com/onury/accesscontrol/issues/10).
### **v1.5.1** (2017-05-24)

@@ -4,0 +8,0 @@

2

lib/AccessControl.js

@@ -109,3 +109,3 @@ "use strict";

if (grants === void 0) { grants = {}; }
this._grants = grants;
this.setGrants(grants);
}

@@ -112,0 +112,0 @@ // -------------------------------

{
"name": "accesscontrol",
"version": "1.5.1",
"version": "1.5.2",
"description": "Role and Attribute based Access Control for Node.js",

@@ -57,3 +57,3 @@ "main": "./index.js",

"devDependencies": {
"@types/node": "^7.0.22",
"@types/node": "^8.0.7",
"docma": "^1.5.1",

@@ -60,0 +60,0 @@ "jasmine": "^2.6.0",

@@ -42,3 +42,3 @@ <p align="center"><img width="465" height="170" src="https://raw.github.com/onury/accesscontrol/master/ac-logo.png" /></p>

#### Basic Example
### Basic Example

@@ -66,3 +66,3 @@ Define roles and grants one by one.

#### Express.js Example
### Express.js Example

@@ -89,3 +89,3 @@ Check role permissions for the requested resource and action, if granted; respond with filtered attributes.

#### Roles
### Roles

@@ -105,3 +105,3 @@ You can create/define roles simply by calling `.grant(<role>)` or `.deny(<role>)` methods on an `AccessControl` instance.

#### Actions and Action-Attributes
### Actions and Action-Attributes

@@ -142,3 +142,3 @@ [CRUD][crud] operations are the actions you can perform on a resource. There are two action-attributes which define the **possession** of the resource: *own* and *any*.

#### Resources and Resource-Attributes
### Resources and Resource-Attributes

@@ -168,3 +168,3 @@ Multiple roles can have access to a specific resource. But depending on the context, you may need to limit the contents of the resource for specific roles.

#### Checking Permissions and Filtering Attributes
### Checking Permissions and Filtering Attributes

@@ -181,3 +181,3 @@ You can call `.can(<role>).<action>(<resource>)` on an `AccessControl` instance to check for granted permissions for a specific resource and action.

#### Defining All Grants at Once
### Defining All Grants at Once

@@ -184,0 +184,0 @@ You can pass the grants directly to the `AccessControl` constructor.

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