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

role-acl

Package Overview
Dependencies
Maintainers
2
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

role-acl - npm Package Compare versions

Comparing version

to
3.3.1

lib/src/AccessControl.d.ts

3

package.json
{
"name": "role-acl",
"version": "3.3.0",
"version": "3.3.1",
"description": "Role, Attribute and Condition based Access Control for Node.js",

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

"build": "rimraf ./lib && mkdirp ./lib && tsc",
"publish": "npm run build && npm publish",
"test": "ts-node ./node_modules/jasmine/bin/jasmine.js JASMINE_CONFIG_PATH=jasmine.json",

@@ -20,0 +21,0 @@ "test:coverage": "./node_modules/istanbul/lib/cli.js cover -e .ts -x \"*.d.ts\" -x \"*.spec.ts\" ts-node node_modules/jasmine/bin/jasmine.js -- JASMINE_CONFIG_PATH=jasmine.json",

@@ -24,2 +24,3 @@ [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=73QY55FZWSPRJ) [![Build Status](https://travis-ci.org/tensult/role-acl.png?branch=master)](https://travis-ci.org/tensult/role-acl) [![Test Coverage](https://api.codeclimate.com/v1/badges/2d748a99b2c54e057cc2/test_coverage)](https://codeclimate.com/github/tensult/role-acl/test_coverage) [![NPM Version](https://badge.fury.io/js/role-acl.svg?style=flat)](https://npmjs.org/package/role-acl) [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/tensult/role-acl/issues)

- Supports AND, OR, NOT, EQUALS, NOT_EQUALS, STARTS_WITH, LIST_CONTAINS conditions.
- You can specify dynamic context values in the conditions using JSON Paths.
- You can define your own condition functions too but please note if you use custom functions instead of standard conditions, you won't be able to save them as json in the DB.

@@ -94,3 +95,4 @@ - Policies are JSON compatible so can be stored and retrieved from database.

// We can use this to prevent someone to approve their own article so that it goes to review by someone before publishing
// We can use this to prevent someone to approve their own article so that it goes to review
// by someone else before publishing
ac.grant('user').condition(

@@ -97,0 +99,0 @@ {