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.
roles.apps
yes
null
This is an array of of apps and their respective roles.
Example
module.exports = {
apps: [
{name: 'myapp', roles: ['find','list','save','remove']}
]
}
roles.profiles
yes
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.*']}
]
}
Language | javascript |
Version | 0.1.0 |
Git URL | https://github.com/nullivex/apx-roles |
License | MIT |
Description | Initializer implementation of node-roles |
Keywords |