apx-roles
Initializer for node-roles for APX API server
Last updated 5 months ago by nullivex .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install apx-roles 
SYNC missed versions from official npm registry.

APX Roles

Kado

STOP AND READ THIS

APX or Apex is no longer maintained and is superseded by Kado.

A new package is available to handle all your JavaScript needs. See kado.org for details.

Summary

Implementation of node-roles through an APX intitializer. Provides apx.roles which can be used to test permissions.

The initializer sets up configuration options to build the definitions used in the role object. Also, apx-helper-crud implements the roles initializer if it is loaded at startup.

Configuration

Apps

  • Variable roles.apps
  • Required yes
  • Default null

This is an array of of apps and their respective roles.

Example

module.exports = {
  apps: [
    {name: 'myapp', roles: ['find','list','save','remove']}
  ]
}

Profiles

  • Variable roles.profiles
  • Required yes
  • Default null

Profiles are used to check roles against the currently logged in user. They are required and should list the available roles to the profile these are called permissions.

Example

module.exports = {
  apps: [
    {name: 'myapp', roles: ['find','list','save','remove']}
  ],
  profiles: [
    {name: 'manager', roles: ['myapp.find','myapp.list','myapp.save']},
    {name: 'admin', roles: ['myapp.*']}
  ]
}

Changelog

0.1.0

  • Initial release

Current Tags

  • 0.1.1                                ...           latest (5 months ago)

2 Versions

  • 0.1.1                                ...           5 months ago
  • 0.1.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (1)
Dev Dependencies (9)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |