@wmfs/tymly-rbac-plugin
v1.31.0
Published
Plugin which provides role-based authentication
Downloads
657
Readme
tymly-rbac-plugin
This plugin handles role based authentication
...
Install
$ npm install tymly-rbac-plugin --save
Add to your list of Tymly plugin's using
await tymly.boot({
blueprintPaths: [
...
],
pluginPaths: [
path.resolve('@wmfs/tymly-rbac-plugin'),
...
]
},
...
The RBAC service will initialise itself from state machine restrictions. Users can be added to groups using the ensureUserRole methods, or by populating the role and role-membership tables.
Tymly's Statebox service is RBAC aware and so, if this plugin is loaded, will using this service to control access to state machines.
Methods
listUserRoles(userId)
checkAuthorization(userId, ctx, resourceType, resourceName, action)
ensureUserRoles(userId, roleIds)
refreshRbacIndex()