Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

resource-access-list

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

resource-access-list

This is a awesome project

  • 0.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
decreased by-62.5%
Maintainers
1
Weekly downloads
 
Created
Source

resource-access-list

NPM version Build Status Downloads Code Style

A simple Loopback ACL middleware with one rule file, also support limited dynamic role supported which base on Loopback model relation method

Inspired by the following libraries/examples:

Install

npm i -S resource-access-list

Usage

const path = require('path')
const Ral = require('resource-access-list')

module.exports = () => {
  const ral = new Ral()
  ral.superRoles = ['admin']
  ral.notAllowStatusCode = 403
  ral.setRules(path.join(__dirname, '../rules'))
  return ral.check
}


Dynamic Role

- for invoke $owner role, need adding 'owner' relationship in the model.json
- for invoke $memeber role, need adding 'member' relationship in the mdoel.json

License

MIT © [chopperlee]

Keywords

FAQs

Package last updated on 26 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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