Socket
Socket
Sign inDemoInstall

resource-access-list

Package Overview
Dependencies
7
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    resource-access-list

This is a awesome project


Version published
Weekly downloads
38
increased by660%
Maintainers
1
Created
Weekly downloads
 

Readme

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

Last updated on 26 Jul 2017

Did you know?

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc